示例#1
0
        public override void Init(BaseLayers layers)
        {
            Layers         = layers;
            Width          = Layers.GameLayer.Width;
            Height         = Layers.GameLayer.Height;
            GameLayerTiles = Layers.Map.GetData <Tile[]>(Layers.GameLayer.Data);

            for (var i = 0; i < Width * Height; i++)
            {
                if (GameLayerTiles[i].Index > 175)
                {
                    continue;
                }

                switch ((MapItems)GameLayerTiles[i].Index)
                {
                case MapItems.TILE_DEATH:
                    GameLayerTiles[i].Index = (byte)TileFlags.DEATH;
                    break;

                case MapItems.TILE_SOLID:
                    GameLayerTiles[i].Index = (byte)TileFlags.SOLID;
                    break;

                case MapItems.TILE_NOHOOK:
                    GameLayerTiles[i].Index = (byte)(TileFlags.SOLID | TileFlags.NOHOOK);
                    break;
                }
            }
        }
示例#2
0
 public abstract void Init(BaseLayers layers);