CNCMaps.Engine.Game.Theater.GetTileCollection C# (CSharp) Метод

GetTileCollection() публичный Метод

public GetTileCollection ( ) : CNCMaps.Engine.Game.TileCollection
Результат CNCMaps.Engine.Game.TileCollection
        public TileCollection GetTileCollection()
        {
            return _tileTypes;
        }

Usage Example

Пример #1
0
        public void RedrawOreAndGems()
        {
            var tileCollection = _theater.GetTileCollection();
            var checkFunc      = new Func <OverlayObject, bool>(delegate(OverlayObject ovl) {
                return(SpecialOverlays.GetOverlayTibType(ovl, Engine) != OverlayTibType.NotSpecial);
            });

            // first redraw all required tiles (zigzag method)
            for (int y = 0; y < FullSize.Height; y++)
            {
                for (int x = FullSize.Width * 2 - 2; x >= 0; x -= 2)
                {
                    if (_tiles[x, y].AllObjects.OfType <OverlayObject>().Any(checkFunc))
                    {
                        _theater.Draw(_tiles.GetTile(x, y), _drawingSurface);
                    }
                }
                for (int x = FullSize.Width * 2 - 3; x >= 0; x -= 2)
                {
                    if (_tiles[x, y].AllObjects.OfType <OverlayObject>().Any(checkFunc))
                    {
                        _theater.Draw(_tiles.GetTile(x, y), _drawingSurface);
                    }
                }
            }
            for (int y = 0; y < FullSize.Height; y++)
            {
                for (int x = FullSize.Width * 2 - 2; x >= 0; x -= 2)
                {
                    if (_tiles[x, y].AllObjects.OfType <OverlayObject>().Any(checkFunc))
                    {
                        List <GameObject> objs = GetObjectsAt(x, y);
                        foreach (GameObject o in objs)
                        {
                            _theater.Draw(o, _drawingSurface);
                        }
                    }
                }
                for (int x = FullSize.Width * 2 - 3; x >= 0; x -= 2)
                {
                    if (_tiles[x, y].AllObjects.OfType <OverlayObject>().Any(checkFunc))
                    {
                        List <GameObject> objs = GetObjectsAt(x, y);
                        foreach (GameObject o in objs)
                        {
                            _theater.Draw(o, _drawingSurface);
                        }
                    }
                }
            }
        }
All Usage Examples Of CNCMaps.Engine.Game.Theater::GetTileCollection