Ejemplo n.º 1
0
 private Game.ExecutionEvent FinishedCallbackFor(ActionArea data, Game.ExecutionEvent onExecutionFinished)
 {
     return(_ =>
     {
         if (onExecutionFinished != null)
         {
             onExecutionFinished(data.action);
         }
     });
 }
Ejemplo n.º 2
0
 public void Do(Action action, Rectangle area, Game.ExecutionEvent onExecutionStarted = null, Game.ExecutionEvent onExecutionFinishes = null)
 {
     this.onExecutionStarted  = onExecutionStarted;
     this.onExecutionFinished = onExecutionFinishes;
     mover.Move(area, action.getKeepDistance(), new ActionArea(action, area), OnMovementFinished, OnMovementCancelled);
 }