Start of rewind system

This commit is contained in:
Rendo 2025-12-21 02:22:41 +05:00
commit 42c95820d7
16 changed files with 55 additions and 33 deletions

View file

@ -14,6 +14,7 @@ extends WeaponState
@export var fire_timer: Timer
var bullets_shot: int = 0
var cached_timestamp: float = 0
func _enter() -> void:
fire()
@ -27,9 +28,10 @@ func on_animation_finished(animation):
if animation == machine.animation_prefix + with_morphems("shoot"):
transition.emit("Idle")
func _use_begin() -> void:
func _use_begin(timestamp: float) -> void:
if fire_timer.time_left > 0:
return
cached_timestamp = timestamp
fire()
func fire() -> void: