Esempio n. 1
0
    void Update()
    {
        currentBullets   = weaponSwitch.GetComponentInChildren <Weapon>().currentBullets;
        bulletsLeft      = weaponSwitch.GetComponentInChildren <Weapon>().bulletsLeft;
        ammoDisplay.text = currentBullets.ToString() + "/" + bulletsLeft.ToString();

        if (playerCtrl.isAiming)
        {
            ammoDisplay.enabled = true;
        }
        else
        {
            ammoDisplay.enabled = false;
        }
    }