Пример #1
0
 public void DestroyGameObject()
 {
     if (!player.HasPower())
     {
         animator.SetBool("death", true);
         Destroy(gameObject, animationDeathTime);
     }
 }
Пример #2
0
 /** On button click, set power true or false, depending on current boolean state**/
 public void OnPointerClick(PointerEventData data)
 {
     if (player.HasPower())
     {
         player.SetPower(false);
     }
     else
     {
         player.SetPower(true);
     }
 }