// Update is called once per frame void Update() { // Store how many shuriken the player had during the last frame previousShurikenLeft = shurikenLeft; // Get the current number of shuriken the player has shurikenLeft = shurikenThrow.GetAmmoLeft(); UpdateShurikenDisplay(); }
//private int currCount = 0; void Start() { shurikenThrow = GameObject.FindObjectOfType <ShurikenThrow>(); previousShurikenLeft = 0; shurikenLeft = shurikenThrow.GetAmmoLeft(); maxShurikenAllowed = shurikenThrow.MaxShuriken; DisableExtraShurikenUI(); UpdateShurikenDisplay(); }