diff options
Diffstat (limited to 'assets/maps')
-rw-r--r-- | assets/maps/misc/test_map/test_map_assets/crane/crane_carriage/crane_carriage.gd | 46 | ||||
-rw-r--r-- | assets/maps/misc/test_map/test_map_assets/crane/crane_frame/animation.gd | 3 |
2 files changed, 22 insertions, 27 deletions
diff --git a/assets/maps/misc/test_map/test_map_assets/crane/crane_carriage/crane_carriage.gd b/assets/maps/misc/test_map/test_map_assets/crane/crane_carriage/crane_carriage.gd index 7618ed3..2b21dac 100644 --- a/assets/maps/misc/test_map/test_map_assets/crane/crane_carriage/crane_carriage.gd +++ b/assets/maps/misc/test_map/test_map_assets/crane/crane_carriage/crane_carriage.gd @@ -1,6 +1,6 @@ extends Spatial -#This script runs the crane animations in a loop. +#This script runs the crane animations in a loop. onready var anim = $AnimationPlayer onready var timer = $crane_load/Timer @@ -8,31 +8,27 @@ onready var timer = $crane_load/Timer var stage = 0 func _ready(): - timer.wait_time = 10 - timer.one_shot = true - timer.start() - - + timer.wait_time = 10 + timer.one_shot = true + timer.start() func _on_Timer_timeout(): - if stage == 0: - anim.play("pick_up_crate") - elif stage == 1: - anim.play("move_x_negative") - elif stage == 2: - anim.play_backwards("pick_up_crate") - elif stage == 3: - anim.play("pick_up_crate") - elif stage == 4: - anim.play_backwards("move_x_negative") - elif stage == 5: - anim.play_backwards("pick_up_crate") - elif stage == 6: - stage = 0 - timer.start() - + if stage == 0: + anim.play("pick_up_crate") + elif stage == 1: + anim.play("move_x_negative") + elif stage == 2: + anim.play_backwards("pick_up_crate") + elif stage == 3: + anim.play("pick_up_crate") + elif stage == 4: + anim.play_backwards("move_x_negative") + elif stage == 5: + anim.play_backwards("pick_up_crate") + elif stage == 6: + stage = 0 + timer.start() func _on_AnimationPlayer_animation_finished(_anim_name): - stage += 1 - timer.start() - + stage += 1 + timer.start() diff --git a/assets/maps/misc/test_map/test_map_assets/crane/crane_frame/animation.gd b/assets/maps/misc/test_map/test_map_assets/crane/crane_frame/animation.gd index c139e88..8b674ef 100644 --- a/assets/maps/misc/test_map/test_map_assets/crane/crane_frame/animation.gd +++ b/assets/maps/misc/test_map/test_map_assets/crane/crane_frame/animation.gd @@ -1,5 +1,4 @@ extends AnimationPlayer - func _ready(): - self.play("flash_beacon") + self.play("flash_beacon") |