public void takeDamege(int damage) { if (!isInvis) { health -= damage; Debug.Log("AAAA"); if (health < 3) { myPhaseController.CmdSetShield(false); } Invoke("enableShield", 0.15f); isInvis = true; Invoke("waitInvis", maxInvisTime); idolsCount = 0; if (health <= 0) { health = 0; AudioManager.instance.playSound("Death", id); myPhaseController.switchPhase(); } else { AudioManager.instance.playSound("Damage", id); } } UIController.instance.UpdateUIPlayer(); }