Esempio n. 1
0
    // Update is called once per frame
    void Update()
    {
        CheckDeath();

        timeSinceStart += Time.deltaTime;

        if (Input.GetKey(KeyCode.RightArrow))
        {
            barrel.PopOut();
        }
        if (Input.GetKey(KeyCode.LeftArrow))
        {
            barrel.PopIn();
        }
        if (Input.GetKey(KeyCode.UpArrow))
        {
            Fire();
        }
        if (Input.GetKey(KeyCode.DownArrow))
        {
            C**k();
        }

        if (Input.GetKey(KeyCode.W))
        {
            MoveGun(Vector3.up);
        }
        if (Input.GetKey(KeyCode.A))
        {
            MoveGun(Vector3.left);
        }
        if (Input.GetKey(KeyCode.S))
        {
            MoveGun(Vector3.down);
        }
        if (Input.GetKey(KeyCode.D))
        {
            MoveGun(Vector3.right);
        }
    }