Bomb
This commit is contained in:
parent
388fe1ccce
commit
6b939d241c
12 changed files with 128 additions and 68 deletions
17
scripts/weapon_system/bomb/bomb_state.gd
Normal file
17
scripts/weapon_system/bomb/bomb_state.gd
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
extends WeaponState
|
||||
|
||||
|
||||
func enter():
|
||||
machine.animation_player.play(machine.animation_prefix+"plant")
|
||||
machine.animation_player.animation_finished.connect(on_animation_finished)
|
||||
|
||||
func exit():
|
||||
machine.animation_player.animation_finished.disconnect(on_animation_finished)
|
||||
|
||||
func on_animation_finished(animation: StringName):
|
||||
if animation == machine.animation_prefix + "plant":
|
||||
return_to_previous.emit()
|
||||
|
||||
func state_input(event: InputEvent) -> void:
|
||||
if event.is_action_released("plr_bomb"):
|
||||
return_to_previous.emit()
|
||||
Loading…
Add table
Add a link
Reference in a new issue