コード例 #1
0
ファイル: tile.Memory.cs プロジェクト: milesgray/resatiate
        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
ファイル: tile.Concrete.cs プロジェクト: milesgray/resatiate
        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);
        }