Ejemplo n.º 1
0
 private void SetHealthIcons()
 {
     if (health == 3)
     {
         Health3.SetActive(true);
         Health2.SetActive(true);
         Health1.SetActive(true);
     }
     if (health == 2)
     {
         Health3.SetActive(false);
         Health2.SetActive(true);
         Health1.SetActive(true);
     }
     if (health == 1)
     {
         Health3.SetActive(false);
         Health2.SetActive(false);
         Health1.SetActive(true);
     }
     if (health == 0)
     {
         Health3.SetActive(false);
         Health2.SetActive(false);
         Health1.SetActive(false);
     }
 }
Ejemplo n.º 2
0
 // Use this for initialization
 void Start()
 {
     animator   = GetComponent <Animator>();
     _Health_   = GameObject.FindObjectOfType <Health3>();
     randomFire = Random.Range(1, 3);
     numFire    = 0;
     upOrDown   = Random.Range(0, 2);
 }