Ejemplo n.º 1
0
 static public void TakeDamage(int damage)
 {
     if (health <= 0)
     {
         return;
     }
     health = health - damage;
     CurrentHealth.UpdateHealth();
 }
Ejemplo n.º 2
0
 // Start is called before the first frame update
 void Start()
 {
     if (ChallengeManager.OneHitDeath)
     {
         health = 1;
         CurrentHealth.UpdateHealth();
     }
     rb = GetComponent <Rigidbody2D>();
     wm = GetComponent <WeaponManager>();
 }