private MoveTask CreateMoveTask(IActor actor, ActorTaskContext taskContext) { var movingModule = actor.Person.GetModuleSafe <IMovingModule>(); if (movingModule is null) { return(new MoveTask(actor, taskContext, TargetNode, taskContext.Sector.Map)); } var moveCost = movingModule.CalculateCost(); return(new MoveTask(actor, taskContext, TargetNode, taskContext.Sector.Map, moveCost)); }
private MoveTask CreateTaskInner(IActor actor) { var taskContext = new ActorTaskContext(_sector); return(CreateMoveTask(actor, taskContext)); }