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

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