Zabiju je 2. Epicky thriller od tvurce Zabiju je
This commit is contained in:
@@ -197,7 +197,6 @@ public class GameManager : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// ── Kill cooldown ─────────────────────────────────────────────────────────
|
||||
private float _killCooldownSeconds = 0f;
|
||||
private const float KillCooldownDuration = 20f;
|
||||
|
||||
@@ -206,10 +205,16 @@ public class GameManager : MonoBehaviour
|
||||
if (_killCooldownSeconds > 0)
|
||||
{
|
||||
_killCooldownSeconds -= Time.deltaTime;
|
||||
// Mirror into GameState so UI reads from the single source of truth
|
||||
if (networkSubsystem?.State != null)
|
||||
networkSubsystem.State.KillCooldownRemaining = _killCooldownSeconds;
|
||||
uiSubsystem?.SetKillCooldownText($"Kill: {Mathf.CeilToInt(_killCooldownSeconds)}s");
|
||||
}
|
||||
else
|
||||
{
|
||||
_killCooldownSeconds = 0f;
|
||||
if (networkSubsystem?.State != null)
|
||||
networkSubsystem.State.KillCooldownRemaining = 0;
|
||||
uiSubsystem?.SetKillCooldownText("");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user