/// <summary> /// Create map /// </summary> internal Map(LevelInfoResource setLevelInfo, LevelVisualResource setLevelVisual, LevelPassableResource setLevelPassable) { OnSelectedEntitiesChanged = null; selectedEntities = new List <Entity>(); TileWidth = 16; TileHeight = 16; MapWidth = 64; MapHeight = 64; levelInfo = setLevelInfo; levelVisual = setLevelVisual; levelPassable = setLevelPassable; mapDiscoverState = new MapDiscover[MapWidth * MapHeight]; tileSet = MapTileset.GetTileset((int)levelInfo.TilesetResourceIndex); Players = new List <BasePlayer>(); AddPlayers(); Rnd = new Random(); Pathfinder = new AStar2D(); }
// LevelVisualResource(setData, setOffset) internal void FillAStar(AStar2D astar) { astar.SetField (passableData, width, height); }
/// <summary> /// Create map /// </summary> internal Map(LevelInfoResource setLevelInfo, LevelVisualResource setLevelVisual, LevelPassableResource setLevelPassable) { OnSelectedEntitiesChanged = null; selectedEntities = new List<Entity>(); TileWidth = 16; TileHeight = 16; MapWidth = 64; MapHeight = 64; levelInfo = setLevelInfo; levelVisual = setLevelVisual; levelPassable = setLevelPassable; mapDiscoverState = new MapDiscover[MapWidth * MapHeight]; tileSet = MapTileset.GetTileset((int)levelInfo.TilesetResourceIndex); Players = new List<BasePlayer> (); AddPlayers(); Rnd = new Random (); Pathfinder = new AStar2D (); }