Esempio n. 1
0
        protected override void OnClosing(CancelEventArgs e)
        {
            base.OnClosing(e);

            _state.OnDestroy();
            GLGarbageCollector.Process();
        }
Esempio n. 2
0
        protected override void OnUpdateFrame(FrameEventArgs e)
        {
            //Vector2 test = MouseInput.GetMousePos();
            //Console.WriteLine(test);
            base.OnUpdateFrame(e);

            float deltatime = (float)e.Time;

            totalTime += deltatime;

            _state.OnUpdate(deltatime);
            CheckForNewState();

            //TODO: Actually do a fixed update
            while (totalTime > 1f / 30f)
            {
                _state.OnFixedUpdate(1f / 30f);
                CheckForNewState();
                totalTime -= 1f / 30f;
            }

            GLGarbageCollector.Process();
        }