// Copyright (c) 2015 - 2023 Doozy Entertainment. All Rights Reserved. // This code can only be used under the standard Unity Asset Store End User License Agreement // A Copy of the EULA APPENDIX 1 is available at http://unity3d.com/company/legal/as_terms // ReSharper disable UnusedMemberInSuper.Global namespace Doozy.Runtime.Mody { /// Interface used by ModyModules to interact with ModyActions public interface IHaveActions { /// Get the Action with the given Action name. /// Name of the Action to search for ModyAction GetAction(string actionName); /// Returns TRUE if an Action with the given Action name is found. /// Name of the Action to search for bool ContainsAction(string actionName); /// Activate all the Actions. Method usually called OnEnable. void ActivateActions(); /// Deactivate all the Actions. Method usually called OnDisable. void DeactivateActions(); /// Execute a method on an Action with the given Action name. /// Name of the Action /// Method to execute /// Ignore cooldown if the Action is in the 'InCooldown' state /// Execute method even if the Action is not enabled void Execute(string actionName, RunAction method, bool ignoreCooldown = false, bool forced = false); /// Start running an Action. If the Action is in the 'InCooldown' state and the given ignoreCooldown value is FALSE, the target Action will not start. /// Name of the Action /// Ignore cooldown if the Action is in the 'InCooldown' state /// Execute method even if the Action is not enabled void StartAction(string actionName, bool ignoreCooldown, bool forced = false); /// Stop running an Action. For an Action to stop it has to be in the 'IsRunning' state. /// Name of the Action void StopAction(string actionName); /// Finishes running an Action (if the Action is in the 'IsRunning' state), by stopping it and then triggering the Finisher (if it has one). /// Name of the Action void FinishAction(string actionName); /// Stop all the running Actions. For an Action to stop it has to be in the 'IsRunning' state. void StopAllActions(); /// Finish all the running Actions and trigger the Finisher for each one (if they have one). void FinishAllActions(); } }