Пример #1
0
 public override void TakeDamage(float dmg)
 {
     P1Health--;
     if (P1Health <= 0)
     {
         // scene = GameObject.FindObjectOfType(typeof(SceneManagerScript)) as SceneManagerScript;
         scene.GameOver();
     }
 }
Пример #2
0
 public override void TakeDamage(float dmg)
 {
     if (!is_invinsible)
     {
         is_invinsible = true;
         P2Health     -= dmg;
         if (P2Health <= 0)
         {
             // scene = GameObject.FindObjectOfType(typeof(SceneManagerScript)) as SceneManagerScript;
             scene.GameOver();
         }
         else
         {
             StartCoroutine(Invinsible());
         }
     }
     //throw new System.NotImplementedException();
 }