Example #1
0
    /// <summary>
    /// Updates the player instance.
    /// </summary>
    void FixedUpdate()
    {
        if (!GameManager.instance.IsPaused())
        {
            transform.position = new Vector3(transform.position.x, 0, transform.position.z);

            if (!stopped && !stopInputPlayer)
            {
                Move();
                moveVector = inputManager.GetMoveVector();
                DashManaging();
                Aim();

                if (timerToShoot < weapon.ratioOfFire)
                {
                    timerToShoot += Time.deltaTime;
                }
                else if (inputManager.Shoot())
                {
                    weapon.Shoot(this.gameObject.tag);
                    //UpdateUI ();
                    timerToShoot = 0.0f;
                }

                //Assegna Shader Outline su arma attiva
                //			shaderApply.ShaderApply (revolverMeshRenderer, revolver.transform.position, outlineShader, standardShader);
            }
        }
    }