public void AddLayer(string name) { MapLayer layer = new MapLayer(name); layer.CreateNew(Width, Height); Layers.Add(layer); }
public void AddLayer() { MapLayer layer = new MapLayer(""); layer.CreateNew(Width, Height); Layers.Add(layer); }
public void CreateNew(int width, int height, int texSize) { TexSize = texSize; Layers.Clear(); MapLayer layer = new MapLayer("New Layer"); layer.CreateNew(width, height); Layers.Add(layer); Decorations.Clear(); Decorations.Add(new AnimLayer("New Deco")); Entities.Clear(); Entities.Add(new EntityLayer("New EntLayer")); int divSize = GraphicsManager.TEX_SIZE; obstacles = new GroundWall[width * TexSize][]; for (int ii = 0; ii < obstacles.Length; ii++) { obstacles[ii] = new GroundWall[height * TexSize]; for (int jj = 0; jj < obstacles[ii].Length; jj++) { obstacles[ii][jj] = new GroundWall(ii * divSize, jj * divSize, divSize, divSize); } } this.grid = new AABB.Grid(width, height, GraphicsManager.TileSize); AddMapScriptEvent(LuaEngine.EMapCallbacks.Init); AddMapScriptEvent(LuaEngine.EMapCallbacks.Enter); }
public void CreateNew(int width, int height, int texSize) { TexSize = texSize; Layers.Clear(); MapLayer layer = new MapLayer("New Layer"); layer.CreateNew(width, height); Layers.Add(layer); int divSize = GraphicsManager.TEX_SIZE; obstacles = new GroundWall[width * TexSize][]; for (int ii = 0; ii < obstacles.Length; ii++) { obstacles[ii] = new GroundWall[height * TexSize]; for (int jj = 0; jj < obstacles[ii].Length; jj++) { obstacles[ii][jj] = new GroundWall(ii * divSize, jj * divSize, divSize, divSize); } } this.grid = new AABB.Grid(width, height, GraphicsManager.TileSize); }