/// <summary> /// On Play we turn our light on and start an over time coroutine if needed /// </summary> /// <param name="position"></param> /// <param name="feedbacksIntensity"></param> protected override void CustomPlayFeedback(Vector3 position, float feedbacksIntensity = 1.0f) { if (Active) { MMFeedbacksShakeEvent.Trigger(Channel, UseRange, EventRange, EventOriginTransform.position); } }
/// <summary> /// On Play we turn our light on and start an over time coroutine if needed /// </summary> /// <param name="position"></param> /// <param name="feedbacksIntensity"></param> protected override void CustomPlayFeedback(Vector3 position, float feedbacksIntensity = 1.0f) { if (!Active || !FeedbackTypeAuthorized) { return; } MMFeedbacksShakeEvent.Trigger(Channel, UseRange, EventRange, EventOriginTransform.position); }
/// <summary> /// On Play we turn our light on and start an over time coroutine if needed /// </summary> /// <param name="position"></param> /// <param name="feedbacksIntensity"></param> protected override void CustomPlayFeedback(Vector3 position, float feedbacksIntensity = 1.0f) { if (!Active || !FeedbackTypeAuthorized) { return; } if (Mode == Modes.PlayFeedbacksInArea) { MMFeedbacksShakeEvent.Trigger(Channel, UseRange, EventRange, EventOriginTransform.position); } else if (Mode == Modes.PlayTargetFeedbacks) { TargetFeedbacks?.PlayFeedbacks(position, feedbacksIntensity); } }
/// <summary> /// Stops listening for events /// </summary> public override void StopListening() { base.StopListening(); MMFeedbacksShakeEvent.Unregister(OnMMFeedbacksShakeEvent); }