// // The Game Board has a few buttons for handling game level functions that don't involve clicking a card // private void WindowButton_Click(object sender, RoutedEventArgs e) { Button windowButton = sender as Button; switch (windowButton.Name) { case "HowToPlay": HowToPlay howtoplay = new HowToPlay(); howtoplay.ShowDialog(); break; case "GimmeaHint": _gameViewModel.GameCommand(windowButton.Name); break; case "NewGame": _gameViewModel.GameCommand(windowButton.Name); break; case "SaveGame": // // Sorry, this feature is not yet implemented // MessageBox.Show("Sorry, Feature is still in Development"); break; case "Quit": Close(); _gameViewModel.GameCommand(windowButton.Name); break; } }
private void Question_Click(object sender, RoutedEventArgs e) { HowToPlay instructionsWindow = new HowToPlay(); instructionsWindow.Show(); this.Close(); }
void OnTriggerEnter(Collider col) { if (col.gameObject.tag == "Train") { sc_MeteorCreate.IResumMMeteorCount--; MeteorCreate.GetComponent <MeteorManager>().DestroySound(); Destroy(gameObject); } if (col.gameObject.tag == "Stick") { if (SceneManager.GetActiveScene().buildIndex == 3) { if (m_Mat.GetColor("_Color") == col.gameObject.GetComponent <MeshRenderer>().material.GetColor("_TintColor")) { sc_MeteorCreate.IResumMMeteorCount--; MeteorCreate.GetComponent <MeteorManager>().DestroySound(); Destroy(gameObject); } } else { HowToPlay tmp = GameObject.Find("Button").GetComponent <HowToPlay>(); tmp.iCount--; Destroy(gameObject); } } }
private void howToPlayToolStripMenuItem_Click(object sender, EventArgs e) { if (HowToPlay != null) { HowToPlay.Invoke(sender, e); } }
public MainMenu() { Instance = this; Active = true; titleScene = new TitleScene(); howto = new HowToPlay(); levelSelect = new LevelSelect(); }
private void button2_Click(object sender, EventArgs e) { var howToPlay = new HowToPlay(); howToPlay.Tag = this; howToPlay.Show(this); Hide(); }
public void Enter() { foreach (SimpleText text in menuEntries) { text.LeaveScreen(); } title.LeaveScreen(); foreach (SimpleText text in menuEntries) { if (text is ColoredText) { switch (text.Name) { case "GameSP": GameSP GameSP = new GameSP(Game, this); Game.Components.Add(GameSP); threadSP.Start(); break; case "GameMP": GameMP GameMP = new GameMP(Game, this); Game.Components.Add(GameMP); threadMP.Start(); break; case "HowToPlay": HowToPlay howToPlay = new HowToPlay(Game, this); Game.Components.Add(howToPlay); break; case "About": About credits = new About(Game, this); Game.Components.Add(credits); break; case "Back": MenuScreen back = new MenuScreen(Game, previousMenuScreen); Game.Components.Add(back); Text.LeaveScreen(); threadMP.Abort(); threadSP.Abort(); break; case "Exit": Game.Exit(); break; } } } }
/// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> protected override void LoadContent() { GameContent.Initialize(Content); // Create a new SpriteBatch, which can be used to draw textures. _spriteBatch = new SpriteBatch(GraphicsDevice); _introScreen = new IntroScreen(this); _mainMenu = new TitleScreen(this); _credits = new CreditsScreen(this); _gameOver = new GameOverScreen(this); _options = new OptionsScreen(this); _loadscreen = new LoadScreen(this); _savescreen = new SaveScreen(this); _loadingScreen = new LoadingScreen(this); _howToPlay = new HowToPlay(this); GameStateManager.Parent = this; //System.Threading.ThreadPool.QueueUserWorkItem(LoadContentAsync); }
void Start() { howToPlay = GetComponent<HowToPlay>(); }
public static void Main() { Console.TreatControlCAsInput = true; string[] menu = new string[] { "1. Play game", "2. How to play", "3.Exit" }; Console.SetWindowSize(120, 47); Console.BackgroundColor = ConsoleColor.Black; Console.Clear(); StreamReader reader = new StreamReader("01-StartScreen.txt"); using (reader) { string line; Console.ForegroundColor = ConsoleColor.DarkMagenta; for (int i = 0; i < 7; i++) { Console.WriteLine(line = reader.ReadLine()); } Console.ForegroundColor = ConsoleColor.DarkRed; for (int i = 7; i < 41; i++) { Console.WriteLine(line = reader.ReadLine()); } } Console.ForegroundColor = ConsoleColor.DarkYellow; bool choise = false; int row = 0; Console.BackgroundColor = ConsoleColor.Cyan; Console.WriteLine(menu[0]); Console.BackgroundColor = ConsoleColor.Black; Console.WriteLine("\n" + menu[1]); Console.WriteLine("\n" + menu[2]); while (!choise) { if (Console.KeyAvailable) { switch (Console.ReadKey().Key) { case ConsoleKey.Enter: { choise = true; if (row == 0) { Apache.PlayApacheCombat(); } else if (row == 1) { HowToPlay._HowToPlay(); } else { System.Diagnostics.Process.GetCurrentProcess().Kill(); } } break; case ConsoleKey.UpArrow: { if (row == 1 || row == 2) { if (row == 1) { row--; Console.SetCursorPosition(0, Console.CursorTop - 5); Console.BackgroundColor = ConsoleColor.Cyan; Console.WriteLine(menu[0]); Console.BackgroundColor = ConsoleColor.Black; Console.WriteLine("\n" + menu[1]); Console.WriteLine("\n" + menu[2]); } else { row--; Console.SetCursorPosition(0, Console.CursorTop - 5); Console.BackgroundColor = ConsoleColor.Black; Console.WriteLine(menu[0]); Console.BackgroundColor = ConsoleColor.Cyan; Console.WriteLine("\n" + menu[1]); Console.BackgroundColor = ConsoleColor.Black; Console.WriteLine("\n" + menu[2]); } } } break; case ConsoleKey.DownArrow: { if (row == 0 || row == 1) { if (row == 0) { row++; Console.SetCursorPosition(0, Console.CursorTop - 5); Console.BackgroundColor = ConsoleColor.Black; Console.WriteLine(menu[0]); Console.BackgroundColor = ConsoleColor.Cyan; Console.WriteLine("\n" + menu[1]); Console.BackgroundColor = ConsoleColor.Black; Console.WriteLine("\n" + menu[2]); } else { row++; Console.SetCursorPosition(0, Console.CursorTop - 5); Console.BackgroundColor = ConsoleColor.Black; Console.WriteLine(menu[0]); Console.WriteLine("\n" + menu[1]); Console.BackgroundColor = ConsoleColor.Cyan; Console.WriteLine("\n" + menu[2]); Console.BackgroundColor = ConsoleColor.Black; } } } break; default: { Console.SetCursorPosition(0, Console.CursorTop); Console.Write(' '); Console.SetCursorPosition(0, Console.CursorTop); } break; } } } }
public virtual void PlayForFun() { HowToPlay.PlayIt(Name); }