Ejemplo n.º 1
0
 public Screen(Engine engine, int width, int height, float scale)
 {
     Engine = engine;
     screenRect = drawRect = new Rectangle(0, 0, width, height);
     viewport = new Viewport();
     viewport.Width = width;
     viewport.Height = height;
 }
Ejemplo n.º 2
0
        private static void EngineOnUpdate(On.Monocle.Engine.orig_Update orig, Monocle.Engine self, GameTime gameTime)
        {
            orig(self, gameTime);
            if (lastRunning != Manager.Running)
            {
                if (Manager.Running)
                {
                    Start();
                }
                else
                {
                    Stop();
                }
            }

            lastRunning = Manager.Running;
        }