private void Awake() { if (Instance == null) { Instance = this; } else { Destroy(this); } }
// 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); }
// Start is called before the first frame update void Start() { gun = FindObjectOfType <GunManager>(); }