Inheritance: VRTK_InteractableObject
Beispiel #1
0
        protected override void Awake()
        {
            base.Awake();
            bullet = transform.Find("Bullet").gameObject;
            bullet.SetActive(false);

            trigger = transform.FindChild("TriggerHolder").gameObject;

            slide          = transform.FindChild("Slide").GetComponent <RealGun_Slide>();
            slideRigidbody = slide.GetComponent <Rigidbody>();
            slideCollider  = slide.GetComponent <Collider>();

            safetySwitch          = transform.FindChild("SafetySwitch").GetComponent <RealGun_SafetySwitch>();
            safetySwitchRigidbody = safetySwitch.GetComponent <Rigidbody>();
            safetySwitchCollider  = safetySwitch.GetComponent <Collider>();
        }
Beispiel #2
0
        protected override void Awake()
        {
            base.Awake();
            bullet = transform.Find("Bullet").gameObject;
            bullet.SetActive(false);

            trigger = transform.FindChild("TriggerHolder").gameObject;

            slide = transform.FindChild("Slide").GetComponent<RealGun_Slide>();
            slideRigidbody = slide.GetComponent<Rigidbody>();
            slideCollider = slide.GetComponent<Collider>();

            safetySwitch = transform.FindChild("SafetySwitch").GetComponent<RealGun_SafetySwitch>();
            safetySwitchRigidbody = safetySwitch.GetComponent<Rigidbody>();
            safetySwitchCollider = safetySwitch.GetComponent<Collider>();
        }