コード例 #1
0
 /// <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);
     }
 }
コード例 #2
0
 /// <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);
 }
コード例 #3
0
        /// <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);
            }
        }
コード例 #4
0
 /// <summary>
 /// Stops listening for events
 /// </summary>
 public override void StopListening()
 {
     base.StopListening();
     MMFeedbacksShakeEvent.Unregister(OnMMFeedbacksShakeEvent);
 }