Exemple #1
0
    void Update()
    {
        GetComponent <AudioSource>().volume = player.GetSoundsVolume();

        if (doesAHumanPlay)
        {
            buttonsValues = player.GetButtonsValues();

            Shoot();
        }
        else
        {
            BotShoot();
        }

        if (player.GetDoResetCooldowns())
        {
            ResetCooldowns();
        }

        for (int i = 0; i < cooldowns.Length; i++)
        {
            cooldowns[i] -= Time.deltaTime;
        }

        cooldownHandler.setCooldowns(cooldowns);
    }