Beispiel #1
0
        int GetCostToNode(CPos destNode, CVec direction)
        {
            var movementCost = locomotor.MovementCostToEnterCell(Actor, destNode, checkConditions, IgnoreActor);

            if (movementCost != short.MaxValue && !(CustomBlock != null && CustomBlock(destNode)))
            {
                return(CalculateCellCost(destNode, direction, movementCost));
            }

            return(CostForInvalidCell);
        }
Beispiel #2
0
 bool CanEnterNode(CPos srcNode, CPos destNode)
 {
     return
         (locomotor.MovementCostToEnterCell(Actor, srcNode, destNode, checkConditions, IgnoreActor)
          != MovementCostForUnreachableCell);
 }
 bool CanEnterNode(CPos srcNode, CPos destNode)
 {
     return
         (locomotor.MovementCostToEnterCell(actor, srcNode, destNode, check, ignoreActor)
          != PathGraph.MovementCostForUnreachableCell);
 }