public void RealizeAction(ACTIONEVENT tipo) { switch (tipo) { case ACTIONEVENT.OnAwake: if (actionOnStart != null) { actionOnStart(this); } break; case ACTIONEVENT.BeforeStart: if (actionBeforeStart != null) { actionBeforeStart(this); } break; case ACTIONEVENT.OnCompleted: if (actionCompleted != null) { actionCompleted(this); } break; case ACTIONEVENT.OnCanceled: if (actionCanceled != null) { actionCanceled(this); } break; } }
public void UnregisterAction(ACTIONEVENT tipo, Action <GameAction> action) { switch (tipo) { case ACTIONEVENT.OnAwake: actionOnStart -= action; break; case ACTIONEVENT.BeforeStart: actionBeforeStart -= action; break; case ACTIONEVENT.OnCompleted: actionCompleted -= action; break; case ACTIONEVENT.OnCanceled: actionCanceled -= action; break; } }