예제 #1
0
        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);
        }
예제 #2
0
파일: Tile.cs 프로젝트: milesgray/resatiate
        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];
        }
예제 #3
0
        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);
        }