Ejemplo n.º 1
0
 public void SubHealth()
 {
     currentHealth -= 1;
     Debug.Log(currentHealth);
     if (currentHealth <= 0)
     {
         if (myGenerator != null)
         {
             myGenerator.RemoveEnemy(this.gameObject);
         }
         Destroy(this.gameObject);
     }
 }