Ejemplo n.º 1
0
        private void Init()
        {
            _gl = GL.GetApi(new GlfwContext(_glfw, _window));
            Assets.Init(_gl);
            Input.Init(_glfw, _window);

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

            _world = new World.World(this);
            _ui    = new Ui(this);
        }
Ejemplo n.º 2
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();
        }