private void EnterHospital(object sender, RoutedEventArgs e) { Village.datetime = Village.datetime.AddHours(1); Village.naruto.yen -= 50; Village.naruto.health = (int)Village.naruto.maxhealth; ProfileBar.updateStats(); }
private static void ConsumeItem(object sender, RoutedEventArgs e) { Button b = (Button)sender; foreach (Item i in Village.naruto.inventory) { if (i.Tag.Equals(b.Tag)) { i.Number--; if (i.Number <= 0) { Village.naruto.inventory.Remove(i); break; } } } if (b.Tag.Equals("healthpotion")) { Village.naruto.health += 10; Battleground.updateStats(); } else if (b.Tag.Equals("sushi")) { Village.naruto.happiness += 20; ProfileBar.updateStats(); } generateItems(); }
private void EnterRamen(object sender, RoutedEventArgs e) { enterbutton.Visibility = Visibility.Hidden; Village.datetime = Village.datetime.AddHours(1); Village.naruto.yen -= 100; Village.naruto.happiness += 70; ProfileBar.updateStats(); background.ImageSource = new BitmapImage(new Uri(@"../../img/eatramen.gif", UriKind.Relative)); }