/// ---------------------------------------------
/// Ultimate Character Controller
/// Copyright (c) Opsive. All Rights Reserved.
/// https://www.opsive.com
/// ---------------------------------------------
namespace Opsive.UltimateCharacterController.Character.Abilities.Starters
{
using Opsive.UltimateCharacterController.Input;
///
/// The AbilityStarter allows a custom object to decide when the ability should start.
///
[System.Serializable]
[UnityEngine.Scripting.Preserve]
public abstract class AbilityStarter
{
protected Ability m_Ability;
///
/// Initializes the starter to the specified ability.
///
/// The ability that owns the starter.
public virtual void Initialize(Ability ability) { m_Ability = ability; }
///
/// Can the starter start the ability?
///
/// A reference to the input component.
/// True if the starter can start the ability.
public abstract bool CanInputStartAbility(PlayerInput playerInput);
///
/// The ability has started.
///
public virtual void AbilityStarted() { }
///
/// The ability has stopped running.
///
public virtual void AbilityStopped() { }
///
/// The object has been destroyed.
///
public virtual void OnDestroy() { }
}
}