Ejemplo n.º 1
0
    internal IEnumerator DisplayHPBar()
    {
        if (!go)
        {
            for (int i = 0; i < currenthealth; i++)
            {
                transform.GetChild(0).GetChild(i).gameObject.SetActive(true);
            }
            PlayerLives.SetActive(true);
            yield return(new WaitForSeconds(5));

            foreach (Transform t in transform.GetChild(0))
            {
                t.gameObject.SetActive(false);
            }
            PlayerLives.SetActive(false);
        }
    }