예제 #1
0
        public static void Main()
        {
            using var container = new GameContainer(false, "Game Sample", 640, 480)
                  {
                      TpsRate   = 30,
                      CanResize = true
                  }.UseMouseInputService();

            var lo = container.Resolve <LoadingOverlay>();

            container.AddOverlay(lo);
            container.AddOverlay(container.Resolve <DebugOverlay>());
            container.AddOverlay(container.Resolve <MouseCursorTestOverlay>());
            var ts = new FadeTransitionScene(lo, container, TimeSpan.FromSeconds(.25));

            container.AddSingleton(ts);
            ts.Initalize <SampleScene>(null);
            container.Start(ts);
        }
예제 #2
0
 private void Form1_Load(object sender, EventArgs e)
 {
     GameContainer gc = new GameContainer(this);
     gc.Start();
 }