18 lines
394 B
C#
18 lines
394 B
C#
|
|
using UnityEngine;
|
||
|
|
|
||
|
|
namespace RPG.Core
|
||
|
|
{
|
||
|
|
public class ActionScheduler : MonoBehaviour
|
||
|
|
{
|
||
|
|
IAction currentAction;
|
||
|
|
public void StartAction(IAction action)
|
||
|
|
{
|
||
|
|
if (currentAction == action) return;
|
||
|
|
if (currentAction != null)
|
||
|
|
{
|
||
|
|
currentAction.Cancel();
|
||
|
|
}
|
||
|
|
currentAction = action;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|