Esempio n. 1
0
    // Update is called once per frame
    void Update()
    {
        if (gameTracker.getPowerIsBIG())
        {
            gameTracker.adjustPowerBIGCountdown(Time.deltaTime);
        }
        if (gameTracker.getPowerBIGCountdown() <= 0 && gameTracker.getPowerIsBIG())
        {
            gameTracker.setPowerIsBIG(false);
            //print(gameTracker.getPowerIsBIG());
            gameObject.transform.localScale = smallBowl;
        }

        if (gameTracker.getPowerIsSPEED())
        {
            gameTracker.adjustPowerSPEEDCountdown(Time.deltaTime);
        }
        if (gameTracker.getPowerSPEEDCountdown() <= 0 && gameTracker.getPowerIsSPEED())
        {
            gameTracker.setPowerIsSPEED(false);
            //print(gameTracker.getPowerIsSPEED());
            gameObject.GetComponent <Movement_bowl>().SetMovementSpeed(5);
        }

        if (gameTracker.message.gameObject.activeSelf)
        {
            gameTracker.adjustPopUpMessageCountdown(Time.deltaTime);
        }
        if (gameTracker.message.gameObject.activeSelf && gameTracker.messageTimer <= 0)
        {
            gameTracker.message.gameObject.SetActive(false);
        }
    }