private void OnEnable() { controller = GetComponentInParent <VRTK_ControllerEvents>(); eventBehaviour = GetComponentInChildren <AnimationEventBehaviour>(); controller.TriggerPressed += OnTriggerPressed; eventBehaviour.OnAttackHandler += DoFiring; }
protected void Awake() { gun = GetComponent <wzx.Gun>(); animEvent = GetComponentInChildren <AnimationEventBehaviour>(); }