コード例 #1
0
ファイル: Screen.cs プロジェクト: saint11/oldskull
 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;
 }
コード例 #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;
        }