示例#1
0
 private void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
     }
     else
     {
         Destroy(this);
     }
 }
示例#2
0
        // Update is called once per frame
        void Update()
        {
            if (gun == null)
            {
                gun = FindObjectOfType <GunManager>();
            }
            isShoot = SteamVR_Input.GetStateUp("ShootGun", SteamVR_Input_Sources.LeftHand);
            if (isShoot)
            {
                gun.ShootGun();
            }

            locomotionVector = SteamVR_Input.GetVector2("Locomotion", SteamVR_Input_Sources.LeftHand);
            locomotion.supplyLocomotionVector(locomotionVector);
        }
示例#3
0
 // Start is called before the first frame update
 void Start()
 {
     gun = FindObjectOfType <GunManager>();
 }