Пример #1
0
 static void ChotaikoOnKeyDown(object sender, KeyboardKeyEventArgs e)
 {
     if (!e.IsRepeat)
     {
         ChotaikoKey l = new ChotaikoKey();
         ChotaikoGlobalContext.OnPress(l);
     }
 }
Пример #2
0
        protected override void OnRenderFrame(FrameEventArgs e)
        {
            base.OnRenderFrame(e);

            GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);

            GL.Begin(PrimitiveType.Polygon);

            ChotaikoGlobalContext.DrawGameContext();

            GL.End();

            SwapBuffers();
        }
Пример #3
0
        static void Main()
        {
            ChotaikoChart       TestChart       = new ChotaikoChart(new System.IO.StreamReader(@"../../TestChart.ctc"));
            ChotaikoGameContext TestGameContext = new ChotaikoGameContext(TestChart);

            ChotaikoGlobalContext.SetGameContext(TestGameContext);
            // The 'using' idiom guarantees proper resource cleanup.
            // We request 30 UpdateFrame events per second, and unlimited
            // RenderFrame events (as fast as the computer can handle).
            using (Chotaiko game = new Chotaiko())
            {
                game.KeyDown += ChotaikoOnKeyDown;
                game.Run(30.0);
            }
        }
Пример #4
0
        protected override void OnUpdateFrame(FrameEventArgs e)
        {
            base.OnUpdateFrame(e);

            ChotaikoGlobalContext.UpdateGameContext();
        }