Exemplo n.º 1
0
    void Update()
    {
        if (gameStartIndicator.isGamePlaying() && Time.deltaTime != 0)
        {
            if (!inputs.inputContinuous())
            {
                rotControl.changePower();
                gameObject.transform.rotation = Quaternion.Euler(new Vector3(0, 0, rotControl.getCurrent()));
            }

            if (ammunition.hasAmmo())
            {
                if (inputs.inputUp())
                {
                    fire();
                    resetCannon();
                }

                if (inputs.inputContinuous())
                {
                    velControl.changePower();
                }
                inputs.informAI(velControl.getCurrentPercent(), rotControl.getCurrentPercent());
            }
        }
    }