Added new Game logic library to assist with game projects
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
using OmegaLeo.HelperLib.Game.Models;
|
||||
|
||||
namespace OmegaLeo.HelperLib.Game.Handlers
|
||||
{
|
||||
public class DelayedActionHandler
|
||||
{
|
||||
private readonly DelayedAction _action;
|
||||
|
||||
internal DelayedActionHandler(DelayedAction action)
|
||||
{
|
||||
_action = action;
|
||||
}
|
||||
|
||||
public void Cancel()
|
||||
{
|
||||
if (_action != null)
|
||||
_action.IsCancelled = true;
|
||||
}
|
||||
|
||||
public bool IsCancelled => _action?.IsCancelled ?? true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user