private void Update()
 {
     _timer.UpdateTime();
     if (_timer.IsFinished)
     {
         _timer.ResetTimer();
         _action.Invoke();
     }
 }
Beispiel #2
0
 private void UpdateFrenzy()
 {
     FrenzyDecayTimer?.UpdateTime();
     if (FrenzyDecayTimer.IsFinished)
     {
         FrenzyOut.Value = 0;
         FrenzyDecayTimer.StopTimer();
     }
 }
Beispiel #3
0
 private void UpdateHunger()
 {
     HungerDecayTimer?.UpdateTime();
     if (HungerDecayTimer.IsFinished && HungerOut.Value > 0)
     {
         damageFeedback.PlayFeedbacks();
         IncrementHunger(-1);
         HungerDecayTimer.RestartTimer();
     }
 }
Beispiel #4
0
 private void Update()
 {
     _spawnDelay.UpdateTime();
     if (_spawnDelay.IsFinished)
     {
         var spawned = TrySpawn();
         if (spawned && _spawned.Count + 1 < _count.Value)
         {
             _spawnDelay.RestartTimer();
         }
     }
 }
Beispiel #5
0
 public void UpdateTime()
 {
     targetParameter?.UpdateTime();
 }