public TileMemory(ITile source) { this.id = source.ID; this.rectangle = source.Rectangle.Clone(); this.adjacentTiles = new ITile[8]; this.enabled = false; this.entityManager = new EntityManager(this); }
public Tile(Point position, Point size, List<IEntity> entityList) { this.id = Guid.NewGuid(); this.position = position; this.rectangle = new Rectangle(position.X, position.Y, size.X, size.Y); //this.entityList = entityList ?? new List<IEntity>(); this.entityManager = new EntityManager(this, entityList); //this.eventObjectList = new SortedList<int, IEventManaging>(); this.eventManager = new TileEventManager(new SortedList<int, IEventManaging>()); this.adjacentTiles = new Tile[8]; }
public Tile(Vector2 position, Point size, IDictionary<Guid, IEntity> entityList) { this.id = Guid.NewGuid(); this.position = position; this.rectangle = new Rectangle( Convert.ToInt32(position.X), Convert.ToInt32(position.Y), Convert.ToInt32(size.X * Tile_Engine.Zoom), Convert.ToInt32(size.Y * Tile_Engine.Zoom) ); this.adjacentTiles = new ITile[8]; this.enabled = false; // set true after adjacent tiles have been mapped this.entityManager = new EntityManager(this, entityList); }