Пример #1
0
        public TileRenderer(Game game, TerrainTile tile) : base(game)
        {
            environs = new EnvironmentRenderer(game, tile);
            normals = new WireframeNormalRenderer(game, environs);
            liquids = new LiquidRenderer(game, tile);
            solidNavMesh = new SolidNavMeshRenderer(game, tile);
            wiredNavMesh = new WireframeNavMeshRenderer(game, tile);

            Game.Components.Add(environs);
            Game.Components.Add(normals);
            Game.Components.Add(liquids);
            Game.Components.Add(solidNavMesh);
            Game.Components.Add(wiredNavMesh);
            
            Disposed += (sender, args) => Cleanup();
            EnabledChanged += (sender, args) => EnabledToggled();
        }
Пример #2
0
        public TileRenderer(Game game, TerrainTile tile) : base(game)
        {
            environs     = new EnvironmentRenderer(game, tile);
            normals      = new WireframeNormalRenderer(game, environs);
            liquids      = new LiquidRenderer(game, tile);
            solidNavMesh = new SolidNavMeshRenderer(game, tile);
            wiredNavMesh = new WireframeNavMeshRenderer(game, tile);

            Game.Components.Add(environs);
            Game.Components.Add(normals);
            Game.Components.Add(liquids);
            Game.Components.Add(solidNavMesh);
            Game.Components.Add(wiredNavMesh);

            Disposed       += (sender, args) => Cleanup();
            EnabledChanged += (sender, args) => EnabledToggled();
        }