using System.Collections; using System.Collections.Generic; using UnityEngine; using MoreMountains.Tools; namespace MoreMountains.Feedbacks { /// /// This feedback will trigger a MMGameEvent of the specified name when played /// [AddComponentMenu("")] [FeedbackHelp("This feedback will trigger a MMGameEvent of the specified name when played")] [FeedbackPath("Events/MMGameEvent")] public class MMFeedbackMMGameEvent : MMFeedback { /// a static bool used to disable all feedbacks of this type at once public static bool FeedbackTypeAuthorized = true; /// sets the inspector color for this feedback #if UNITY_EDITOR public override Color FeedbackColor { get { return MMFeedbacksInspectorColors.EventsColor; } } #endif public string MMGameEventName; /// /// On Play we change the values of our fog /// /// /// protected override void CustomPlayFeedback(Vector3 position, float feedbacksIntensity = 1.0f) { if (!Active || !FeedbackTypeAuthorized) { return; } MMGameEvent.Trigger(MMGameEventName); } } }