Esempio n. 1
0
 /// <summary>
 ///
 /// </summary>
 /// <returns>False if the cube couldn't take the damage and died :(</returns>
 public bool TakeDamage()
 {
     if (timer >= collisionCooldown)
     {
         timer = 0;
         AudioManager.Instance.PlaySound(Constants.SOUND_DAMAGE);
         if (stateMachine.currentState == stateMachine.Next())
         {
             cubeController.Respawn();
             return(false);
         }
     }
     return(true);
 }