public void idolTouch() { if (myPhaseController.hasAuthority) { if (myPhaseController.isAlive) { AudioManager.instance.playSound("Idol", id); myPhaseController.CmdGetScore(id - 1, 10); if (health < maxHealth) { myPhaseController.CmdGetHealthUp(1); } else if (idolsCount < maxIdols) { idolsCount++; } if (idolsCount == maxIdols && health >= 3) { myPhaseController.CmdSetShield(true); } } else { myPhaseController.CmdGetScore(id - 1, 40); myPhaseController.CmdSaySwitchPhase(); Debug.Log(maxHealth); myPhaseController.CmdGetHealthUp(maxHealth); } } UIController.instance.UpdateUIPlayer(); }