public static void NewGame(Huone h, Avain a1, Avain a2, Avain a3, TextBlock m) { a1.NewKey(); a2.NewKey(); a3.NewKey(); h.Avaimet.Add(a1); h.Avaimet.Add(a2); h.Avaimet.Add(a3); h.KeyAmount = 0; Toiminta.MessageWork(h.KeyAmount, m); }
public static void HelpWork(Avain a1, Avain a2, Avain a3, Button b1, Button b2, Button b3, TextBlock m) { SoundPlayer click = new System.Media.SoundPlayer(Properties.Resources.click); click.Play(); if (a1.IsFound == false) { if (a1.IsHint == false) { a1.HintAppear(b1); } else { a1.HintAppear(b1); m.Text = "You can't see next hint until you take this one!"; SoundPlayer audio = new SoundPlayer(harjoitus.Properties.Resources.fail); audio.Play(); } } else if (a2.IsFound == false) { if (a2.IsHint == false) { a2.HintAppear(b2); } else { a2.HintAppear(b2); m.Text = "You can't see next hint until you take this one!"; SoundPlayer audio = new SoundPlayer(harjoitus.Properties.Resources.fail); audio.Play(); } } else if (a3.IsFound == false) { if (a3.IsHint == false) { a3.HintAppear(b3); } else { a3.HintAppear(b3); m.Text = "You can't see next hint until you take this one!"; SoundPlayer audio = new SoundPlayer(harjoitus.Properties.Resources.fail); audio.Play(); } } }
public static void LoadGame(Huone h, Avain a1, Avain a2, Avain a3, Button b1, Button b2, Button b3, Image i1, Image i2, Image i3, TextBlock m) { if (a1.IsFound == true) { b1.Visibility = Visibility.Hidden; a1.IsFound = true; } if (a2.IsFound == true) { b2.Visibility = Visibility.Hidden; a2.IsFound = true; } if (a3.IsFound == true) { b3.Visibility = Visibility.Hidden; a3.IsFound = true; } MenuKeys(h.KeyAmount, i1, i2, i3); MessageWork(h.KeyAmount, m); }