예제 #1
0
        private static void Main()
        {
            var engine = new GameEngine();

            using (engine)
            {
                engine.Run();
            }
        }
 protected void OnClick(object buttonClicked, EventArgs args)
 {
     Button currentClickedButton = buttonClicked as Button;
     switch (currentClickedButton.ButtonName)
     {
         case "play":
             using (var engine = new GameEngine())
             {
                 engine.Run();
             }
             break;
         case "howToPlay":
             currentClickedButton.ButtonTopLeftY++;
             break;
         case "about":
             currentClickedButton.ButtonTopLeftX--;
             break;
         case "quit":
             this.Exit();
             break;
     }
 }