Exemplo n.º 1
0
 private void CheckAttackTimer()
 {
     timer += Time.deltaTime;
     if (_currentEvent == Events.READY_TO_ATTACK && Gamesystem.gameState == GameState.IN_WAVE)
     {
         if (timer > _offensiveComp.cooldown)
         {
             _offensiveComp.SearchAndAttack();
             timer = 0;
         }
     }
 }
Exemplo n.º 2
0
 void Update()
 {
     timer += Time.deltaTime;
     if (Gamesystem.gameState == GameState.IN_WAVE)
     {
         if (timer > _offensiveComp.cooldown)
         {
             if (_offensiveComp.SearchAndAttack())
             {
                 _animatorComp.SetBool(BOOL_SHOOT, true);
             }
             timer = 0;
         }
     }
 }