Start AI COntroller
This commit is contained in:
18
Assets/Scripts/Core/ActionScheduler.cs
Normal file
18
Assets/Scripts/Core/ActionScheduler.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user