Exemple #1
0
 // Start is called before the first frame update
 void Start()
 {
     if (playerCollect)
     {
         amount.text           = playerCollect.numCollectables.ToString();
         amountBackshadow.text = playerCollect.numCollectables.ToString();
     }
     uiSlide = GetComponentInParent <UISlide>();
 }
Exemple #2
0
    // Start is called before the first frame update
    void Awake()
    {
        damageSprites = new GameObject[5];
        Transform healthSprite;

        for (int i = 0; i < 5; i++)
        {
            healthSprite     = transform.Find("Health Sprite " + (i + 1).ToString());
            damageSprites[i] = healthSprite.Find("Damage Sprite").gameObject;
            damageSprites[i].SetActive(false);
            if (i >= maxHealth)
            {
                healthSprite.gameObject.SetActive(false);
            }
        }
        uiSlide = GetComponent <UISlide>();
    }