private void LoadGamePicture_Click(object sender, EventArgs e) { if (openFileDialog.ShowDialog() == DialogResult.OK) { GameMenu game = new GameMenu(SimpleGame.Logic.Game.LoadGame(openFileDialog.FileName)); this.Hide(); game.Show(); } }
private void LoadGamePicture_Click(object sender, EventArgs e) { if (openFileDialog.ShowDialog() == DialogResult.OK) { var player = game.LoadGame(openFileDialog.FileName); GameMenu gameMenu = new GameMenu(game, itemGenerator, player, monsterRepository); this.Hide(); gameMenu.Show(); } }
private void newgame() { NewGame window = new NewGame(); if (window.ShowDialog(this) == DialogResult.OK) { GameMenu game = new GameMenu(SimpleGame.Logic.Game.StartGame(window.CharacterNameTextBox())); this.Hide(); game.Show(); } }
private void newgame() { NewGame window = new NewGame(game); if (window.ShowDialog(this) == DialogResult.OK) { var player = game.StartGame(window.CharacterNameTextBox()); GameMenu gameMenu = new GameMenu(game, itemGenerator, player, monsterRepository); this.Hide(); gameMenu.Show(); } }