/// <summary> /// Creates a Tile of Membrane (default) type. /// </summary> /// <param name="x">Tile x-coordinate.</param> /// <param name="y">Tile y-coordinate.</param> public Tile(int x, int y) : base(new Vector2((float)(x+0.5), (float)(y+0.5)), null) { this.type = new TerrainType(); this.visibleTo = new HashSet<Player>(); this.units = new Dictionary<Player, HashSet<Unit>>(); this.allUnits = new List<Unit>(); this.building = null; this.lineDrawPoints = new List<Vector2>(); }
/// <summary> /// Creates a Tile of the type 'type'. /// </summary> /// <param name="type">Enum of the terrain type.</param> /// <param name="x">Tile x-coordinate.</param> /// <param name="y">Tile y-coordinate.</param> public Tile(int x, int y, Globals.TerrainTypes type) : base(new Vector2(x, y), null) { this.type = new TerrainType(type); this.visibleTo = new HashSet<Player>(); this.units = new Dictionary<Player, HashSet<Unit>>(); this.allUnits = new List<Unit>(); this.position = new Vector2(x, y); this.building = null; this.lineDrawPoints = new List<Vector2>(); }
public void init() { tp1 = new TerrainType(); tp2 = new TerrainType(Globals.TerrainTypes.Infected); }
/// <summary> /// Change TerrainType of this tile. /// </summary> /// <param name="type">Enum of the terrain type.</param> public void ChangeTerrainType(Globals.TerrainTypes type) { if (this.type.GetEnum() != type) { this.type = new TerrainType(type); } }
public void init() { tp1 = new TerrainType(); tp2 = new TerrainType(Globals.TerrainTypes.Infected); }