Пример #1
0
        public void OnOpening(object enterInformation)
        {
            if (!_isLoaded)
            {
                ActiveWorld = enterInformation as World;
                if (ActiveWorld == null) throw new InvalidOperationException("Did not receive loaded data.");

                _renderStatisticsOverlay = new UiOverlay();
                _renderStatisticsOverlay.AddElement(new RenderStatisticsView(ActiveWorld));

                GameInstance.LoadedSave = TestMock.CreateTempSave();
                GameInstance.LoadedSave.Load(GameInstance.GetService<GameModeManager>().ActiveGameMode);

                _isLoaded = true;
            }

            _inputSystem = GameInstance.GetService<InputSystem>();
            _screenManager = GameInstance.GetService<ScreenManager>();
            _sceneRenderer = GameInstance.GetService<SceneRenderer>();
            _collisionManager = GameInstance.GetService<CollisionManager>();
            _spriteBatch = GameInstance.GetService<SpriteBatch>();
            _shapeRenderer = GameInstance.GetService<ShapeRenderer>();
        }
 public GradientShapeTextureProvider(ShapeRenderer renderer)
 {
     _renderer = renderer;
 }
 public SingleColorShapeTextureProvider(ShapeRenderer renderer)
 {
     _renderer = renderer;
 }
Пример #4
0
 public RenderStatisticsView(World activeWorld)
 {
     _world = activeWorld;
     _shapeRenderer = GameInstance.GetService<ShapeRenderer>();
     _debugSpriteFont = GameInstance.Content.Load<SpriteFont>(ResourceNames.Fonts.DebugFont);
 }
 public GradientShapeTextureProvider(ShapeRenderer renderer)
 {
     _renderer = renderer;
 }
Пример #6
0
 public SingleColorShapeTextureProvider(ShapeRenderer renderer)
 {
     _renderer = renderer;
 }