public bool Equals(AutoTile other) { if (other == null) { return(false); } if (AutoTileset > -1) { return(AutoTileset == other.AutoTileset && BorderTileset == other.BorderTileset); } if (Layers.Count != other.Layers.Count) { return(false); } for (int ii = 0; ii < Layers.Count; ii++) { if (Layers[ii] != other.Layers[ii]) { return(false); } } return(true); }
public Map() { Name = new LocalText(); Comment = ""; Music = ""; TileSight = SightRange.Clear; CharSight = SightRange.Clear; TeamSpawns = new SpawnList <TeamSpawner>(); ItemSpawns = new SpawnList <InvItem>(); BlankBG = new AutoTile(); PrepareEvents = new List <SingleCharEvent>(); StartEvents = new List <SingleCharEvent>(); CheckEvents = new List <SingleCharEvent>(); Status = new Dictionary <int, MapStatus>(); FloorBG = new AutoTile(); TextureMap = new Dictionary <int, AutoTile>(); CurrentTurnMap = new TurnState(); }
public Map() { AssetName = ""; Name = new LocalText(); Comment = ""; Music = ""; ScriptEvents = new Dictionary <LuaEngine.EDungeonMapCallbacks, ScriptEvent>(); TileSight = SightRange.Clear; CharSight = SightRange.Clear; TeamSpawns = new SpawnList <TeamSpawner>(); ItemSpawns = new CategorySpawnChooser <InvItem>(); Background = new MapBG(); BlankBG = new AutoTile(); MapEffect = new ActiveEffect(); CheckEvents = new List <SingleCharEvent>(); Status = new Dictionary <int, MapStatus>(); TextureMap = new Dictionary <int, AutoTile>(); CurrentTurnMap = new TurnState(); }
protected AutoTile(AutoTile other) : this() { foreach (TileLayer layer in other.Layers) { Layers.Add(new TileLayer(layer)); } AutoTileset = other.AutoTileset; BorderTileset = other.BorderTileset; }
public void CreateNew(int width, int height) { Tiles = new AutoTile[width][]; for (int ii = 0; ii < width; ii++) { Tiles[ii] = new AutoTile[height]; for (int jj = 0; jj < height; jj++) { Tiles[ii][jj] = new AutoTile(); } } }
protected AutoTile(AutoTile other) : this() { foreach (TileLayer layer in other.Layers) { Layers.Add(new TileLayer(layer)); } AutoTileset = other.AutoTileset; NeighborCode = other.NeighborCode; foreach (int tile in other.Associates) { Associates.Add(tile); } }
protected MapLayer(MapLayer other) { Name = other.Name; Front = other.Front; Visible = other.Visible; Tiles = new AutoTile[other.Tiles.Length][]; for (int ii = 0; ii < other.Tiles.Length; ii++) { Tiles[ii] = new AutoTile[other.Tiles[0].Length]; for (int jj = 0; jj < other.Tiles[0].Length; jj++) { Tiles[ii][jj] = other.Tiles[ii][jj].Copy(); } } }
public bool Equals(AutoTile other) { if (other == null) { return(false); } if (AutoTileset != other.AutoTileset) { return(false); } if (AutoTileset > -1) { if (Associates.Count != other.Associates.Count) { return(false); } foreach (int tile in Associates) { if (!other.Associates.Contains(tile)) { return(false); } } return(true); } else { if (Layers.Count != other.Layers.Count) { return(false); } for (int ii = 0; ii < Layers.Count; ii++) { if (Layers[ii] != other.Layers[ii]) { return(false); } } return(true); } }
protected Tile(Tile other) { Data = other.Data.Copy(); FloorTile = other.FloorTile.Copy(); Effect = new EffectTile(other.Effect); }
public Tile(int type, Loc loc) { Data = new TerrainTile(type); FloorTile = new AutoTile(); Effect = new EffectTile(loc); }
public Tile() { Data = new TerrainTile(); FloorTile = new AutoTile(); Effect = new EffectTile(); }
protected TerrainTile(TerrainTile other) { ID = other.ID; TileTex = other.TileTex.Copy(); }
public TerrainTile(int index, AutoTile tex) { ID = index; TileTex = tex; }
public TerrainTile() { TileTex = new AutoTile(); }