Exemple #1
0
        private void Init()
        {
            var context = new GlfwContext(_glfw, _window);

            _gl       = GL.GetApi(context);
            _legacyGl = Silk.NET.OpenGL.Legacy.GL.GetApi(context);

            ResourceManager.Init(_gl);
            Input.Init(_glfw, _window);

            _glFons = new GLFons(_legacyGl);
            _fons   = _glFons.Create(512, 512, (int)FonsFlags.ZeroTopleft);
            _fons.AddFont("stdfont", "./Assets/Fonts/DroidSerif-Regular.ttf");

            _camera = new Camera(0.0f, 0.0f, 0.0f, 0.0f);

            _stateManager.AddState("Main Menu", new MenuState());
            _stateManager.AddState("Level Selector", new LevelSelectorState());
            _stateManager.AddState("Game", new GameState());

            MusicMaster.Start();
        }