private void  OnEnable()
        {
            controller     = GetComponentInParent <VRTK_ControllerEvents>();
            eventBehaviour = GetComponentInChildren <AnimationEventBehaviour>();

            controller.TriggerPressed      += OnTriggerPressed;
            eventBehaviour.OnAttackHandler += DoFiring;
        }
Example #2
0
 protected void Awake()
 {
     gun       = GetComponent <wzx.Gun>();
     animEvent = GetComponentInChildren <AnimationEventBehaviour>();
 }