27 lines
574 B
GDScript
27 lines
574 B
GDScript
@tool
|
|
extends AnimationRoot
|
|
|
|
|
|
# 覆盖该方法
|
|
func _default_data() -> Dictionary:
|
|
return {}
|
|
|
|
|
|
func _ready() -> void:
|
|
super._ready()
|
|
if Engine.is_editor_hint():
|
|
return
|
|
|
|
func _on_ground_ready() -> void:
|
|
# 不显示玩家,锁定玩家移动
|
|
SceneManager.freeze_player(0)
|
|
# 直接播放动画效果
|
|
var animation_player = $"../DeployLayer/小小蝶探头"
|
|
animation_player.animation_finished.connect(_on_animation_finished)
|
|
SceneManager.focus_node(animation_player)
|
|
|
|
func _on_animation_finished():
|
|
# 鬼差眼睛
|
|
var ghost = $"../S10鬼差探头"
|
|
ghost.play()
|