Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 2
0
        private MoveTask CreateTaskInner(IActor actor)
        {
            var taskContext = new ActorTaskContext(_sector);

            return(CreateMoveTask(actor, taskContext));
        }