State machine rework
This commit is contained in:
parent
3f99f1b8dd
commit
87919ed890
25 changed files with 102 additions and 76 deletions
|
|
@ -11,11 +11,11 @@ extends WeaponState
|
|||
|
||||
var bullets_shot: int = 0
|
||||
|
||||
func enter() -> void:
|
||||
func _enter() -> void:
|
||||
fire()
|
||||
machine.animation_player.animation_finished.connect(on_animation_finished)
|
||||
|
||||
func exit() -> void:
|
||||
func _exit() -> void:
|
||||
bullets_shot = 0
|
||||
machine.animation_player.animation_finished.disconnect(on_animation_finished)
|
||||
|
||||
|
|
@ -23,7 +23,7 @@ func on_animation_finished(animation):
|
|||
if animation == with_morphems("shoot"):
|
||||
transition.emit("Idle")
|
||||
|
||||
func use_begin() -> void:
|
||||
func _use_begin() -> void:
|
||||
if fire_timer.time_left > 0:
|
||||
return
|
||||
fire()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue