// Use this for initialization public override void Start() { _trackedObject = GetComponent <SteamVR_TrackedObject>(); _gunDisplay = GetComponentInChildren <GunDisplay>(); device = SteamVR_Controller.Input((int)_trackedObject.index); base.Start(); }
private void Awake() { switch (gameObject.name) { case "Gun": GunInstance = this; break; case "Clip": ClipInstance = this; break; case "Ammo": AmmoInstance = this; break; } textMesh = GetComponent <TextMeshProUGUI>(); }
void Start() { base.Start(); _gunDisplay = GetComponentInChildren <GunDisplay>(); }