State machine rework
This commit is contained in:
parent
3f99f1b8dd
commit
87919ed890
25 changed files with 102 additions and 76 deletions
|
|
@ -2,14 +2,14 @@ extends WeaponState
|
|||
|
||||
@export var bomb_scene: PackedScene
|
||||
|
||||
func enter():
|
||||
func _enter():
|
||||
machine.animation_player.play(machine.animation_prefix+"plant")
|
||||
machine.animation_player.animation_finished.connect(on_animation_finished)
|
||||
if is_multiplayer_authority():
|
||||
machine.speed_modifier = 0.0
|
||||
machine.player.get_node("PlantAudio").multiplayer_play()
|
||||
|
||||
func exit():
|
||||
func _exit():
|
||||
machine.animation_player.animation_finished.disconnect(on_animation_finished)
|
||||
machine.speed_modifier = 1.0
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue