public List <Tuple <int, int> > PathFromTo(Tuple <int, int> origin, Tuple <int, int> target) { if (pathfinder == null) { pathfinder = new MapPathfinder(this); } return(pathfinder.GetFastApproximateFullPathFrom(origin, target)); }
public override List <HexCoordinates> GetTargetSpaces(HexCoordinates source, HexDirection dir, EntityMapping entityMap, TileListBase tileMap, IMapCollisionDetection collide) { EntityAbilityUser AAUser = AbilityUser as EntityAbilityUser; if (AAUser) { List <HexCoordinates> ret = MapPathfinder.GetAllPathableTiles(entityMap, tileMap, source, AAUser.GetComponent <IEntityMovement>(), collide); //probably not good return(ret); } else { return(new List <HexCoordinates>()); } }
void Start() { rb = GetComponent <Rigidbody>(); //SINGLETON TAL VEZ O SCRIPTABLE OBJECTS mapPathfinder = GameObject.FindWithTag("Respawn").GetComponent <MapPathfinder>(); }
internal static bool CanPath(IMapCollisionDetection map, EntityMapping entityMap, TileListBase tileMap, IEntityMovement actor, HexCoordinates source, HexCoordinates target) { return (MapPathfinder.GetPath(map, entityMap, tileMap, source, target, actor) != null); //Slow }