Added hitstop manager

This commit is contained in:
2026-06-27 23:10:54 +03:00
parent fef98da4e0
commit f8fbc206e8
8 changed files with 50 additions and 8 deletions
+15
View File
@@ -0,0 +1,15 @@
class_name CHitstopManager
extends Node
const NORMAL_TIME_SCALE = 1.0
@export var hitstop_duration := 0.1
@export var hitstop_time_scale := 0.0
func hitstop() -> void:
Engine.time_scale = hitstop_time_scale
await get_tree().create_timer(hitstop_duration, true, true, true).timeout
Engine.time_scale = NORMAL_TIME_SCALE