예제 #1
0
파일: Game1.cs 프로젝트: v1996-96/fool
        protected override void Initialize()
        {
            spriteManager = new SpriteManager(this);
            Components.Add(spriteManager);

            base.Initialize();

            gameGateway.OnGameFinished += GameFinishedHandler;

            LoginForm loginForm = new LoginForm();
            loginForm.OnStartWithAI += (nickname) =>
            {
                gameGateway.SpriteManager = spriteManager;
                gameGateway.StartGame();
            };
            loginForm.OnStartWithNetUser += (nickname) => { MessageBox.Show("Comming soon"); };
            loginForm.OnAboutShow += () =>
            {
                About about = new About();
                about.ShowDialog();
            };
            loginForm.OnExit += () => { _exitCommand = true; };

            loginForm.ShowDialog();
        }
예제 #2
0
파일: Game1.cs 프로젝트: v1996-96/fool
 private void GameFinishedHandler(string status)
 {
     ResultWindow result = new ResultWindow(status);
     result.OnStartWithAI += () =>
     {
         gameGateway.SpriteManager = spriteManager;
         gameGateway.StartGame();
     };
     result.OnStartWithNetUser += () => { MessageBox.Show("Comming soon"); };
     result.OnAboutShow += () =>
     {
         About about = new About();
         about.ShowDialog();
     };
     result.OnExit += () => { _exitCommand = true; };
     result.ShowDialog();
 }