depleted ammo destruction
This commit is contained in:
parent
7c7f68b6f5
commit
900502ec8a
12 changed files with 68 additions and 2068 deletions
12
scripts/weapon_system/bomb/bomb_idle_state.gd
Normal file
12
scripts/weapon_system/bomb/bomb_idle_state.gd
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
extends WeaponState
|
||||
|
||||
|
||||
func enter() -> void:
|
||||
machine.animation_player.play(machine.animation_prefix+"idle")
|
||||
|
||||
func exit() -> void:
|
||||
pass
|
||||
|
||||
func state_input(event: InputEvent) -> void:
|
||||
if event.is_action("plr_bomb"):
|
||||
transition.emit("Plant")
|
||||
1
scripts/weapon_system/bomb/bomb_idle_state.gd.uid
Normal file
1
scripts/weapon_system/bomb/bomb_idle_state.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://cx7j3kr1laq3s
|
||||
12
scripts/weapon_system/bomb/bomb_intro_state.gd
Normal file
12
scripts/weapon_system/bomb/bomb_intro_state.gd
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
extends WeaponState
|
||||
|
||||
func enter() -> void:
|
||||
machine.animation_player.play(machine.animation_prefix+"intro")
|
||||
machine.animation_player.animation_finished.connect(on_animation_finished)
|
||||
|
||||
func exit() -> void:
|
||||
machine.animation_player.animation_finished.disconnect(on_animation_finished)
|
||||
|
||||
func on_animation_finished(animation: StringName):
|
||||
if animation == machine.animation_prefix + "intro":
|
||||
transition.emit("Idle")
|
||||
1
scripts/weapon_system/bomb/bomb_intro_state.gd.uid
Normal file
1
scripts/weapon_system/bomb/bomb_intro_state.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://dmyir46aricwi
|
||||
|
|
@ -21,5 +21,4 @@ func on_animation_finished(animation: StringName):
|
|||
|
||||
func state_input(event: InputEvent) -> void:
|
||||
if event.is_action_released("plr_bomb"):
|
||||
|
||||
return_to_previous.emit()
|
||||
transition.emit("Idle")
|
||||
Loading…
Add table
Add a link
Reference in a new issue