30 lines
474 B
GDScript
30 lines
474 B
GDScript
@tool
|
|
extends AnimationRoot
|
|
|
|
|
|
# 覆盖该方法
|
|
func _default_data() -> Dictionary:
|
|
return {}
|
|
|
|
|
|
func _ready() -> void:
|
|
super._ready()
|
|
if Engine.is_editor_hint():
|
|
return
|
|
|
|
|
|
var ghost
|
|
|
|
|
|
func _on_ground_ready() -> void:
|
|
ghost = $"../DeployLayer/Ghost"
|
|
# test
|
|
# call_deferred("_ghost_move")
|
|
|
|
|
|
func _ghost_move() -> void:
|
|
ghost.visible = true
|
|
ghost.play()
|
|
var tween = create_tween()
|
|
tween.tween_property(ghost, "global_position", Vector2(1500, 0), 20.0).as_relative()
|