Example #1
0
    // Update is called once per frame
    void Update()
    {
        if (Input.GetButtonDown("Fire1") || arduino.IsShooting() == true)
        {
            Shoot();
        }

        if (gun != null)
        {
            if (vrGun != null)
            {
                vrGun.SetRotation(gun.GetVrGunRotation());
            }

            if (gun.IsShooting())
            {
                Shoot();
            }
        }

        Move();
    }