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); } }
// 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); }