Inheritance: VRTK_InteractableObject
示例#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>();
        }
示例#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>();
        }