mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 06:51:54 +08:00
fix: 调整相机震动参数并优化组件管理器初始化
将BroomGun的相机震动持续时间从300调整为200,减少震动效果 移除WorldManager中手动调用ComponentManager.init() 在ComponentManager中添加静态初始化方法自动调用init()
This commit is contained in:
@@ -4,7 +4,7 @@ class_name BroomGun
|
|||||||
@export var canTrace: bool = true
|
@export var canTrace: bool = true
|
||||||
|
|
||||||
func shake():
|
func shake():
|
||||||
CameraManager.shake(2000, 300)
|
CameraManager.shake(2000, 200)
|
||||||
func ai():
|
func ai():
|
||||||
if canTrace:
|
if canTrace:
|
||||||
look_at(launcher.currentFocusedPosition)
|
look_at(launcher.currentFocusedPosition)
|
||||||
|
|||||||
@@ -17,6 +17,9 @@ static var themes = {}
|
|||||||
static var fieldTextures = {}
|
static var fieldTextures = {}
|
||||||
static var itemTextures = {}
|
static var itemTextures = {}
|
||||||
|
|
||||||
|
static func _static_init() -> void:
|
||||||
|
init()
|
||||||
|
|
||||||
static func init():
|
static func init():
|
||||||
for i in DirTool.listdir("res://components/Abstracts"):
|
for i in DirTool.listdir("res://components/Abstracts"):
|
||||||
abstracts[DirTool.getBasenameWithoutExtension(i)] = load(i)
|
abstracts[DirTool.getBasenameWithoutExtension(i)] = load(i)
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ func _ready():
|
|||||||
tree = get_tree()
|
tree = get_tree()
|
||||||
rootNode = self
|
rootNode = self
|
||||||
spawner = $%spawner
|
spawner = $%spawner
|
||||||
ComponentManager.init()
|
|
||||||
spawner.spawn_function = justReturn
|
spawner.spawn_function = justReturn
|
||||||
func _physics_process(delta):
|
func _physics_process(delta):
|
||||||
runningTime += delta * 1000
|
runningTime += delta * 1000
|
||||||
|
|||||||
Reference in New Issue
Block a user