Пример #1
0
 public void OnDamage()
 {
     health--;
     if (health <= 0)
     {
         MC.Death();
     }
 }
Пример #2
0
 void Update()
 {
     timer         += Time.deltaTime;
     timerText.text = ((int)timer).ToString();
     if (timer >= 30.0f)
     {
         timer = 0;
         Debug.Log("mc death");
         MC.Death();
     }
 }