private void KaempfeWennMoeglich(int buttonIndex) { if (Kampf != null) { if (Kampf.IstZuende) { Kampf?.ContinueWin(); Kampf = null; } else { switch (buttonIndex) { case 0: Kampf.Button1Angriff(); break; case 1: Kampf.Button2Magie(); break; case 2: if (ListBoxInventar.SelectedItem is Item selectedItem) { Kampf.Button3Item(selectedItem); } break; } if (Kampf.IstZuende) { if (AktuellerHeld.Lebenspunkte <= 0) { if (Kampf.ContinueTot != null) { Kampf.ContinueTot(); } else { WriteText("Du bist im Kampf gestorben!"); } SpielZuende(); } else { SetButtonsText("Kampf beenden"); } } } } }
public static void beginnKampf() { Schnittstelle st = new Schnittstelle(); Kampf k = new Kampf(st); k.Add(getChara("Andrej Ilitsch Kalinin"), "Spieler"); k.Add(getChara("Maximilian Koelbe"), "Spieler"); k.Add(getChara("Claude Delacroix"), "Spieler"); k.Add(getChara("Brigitte Westerkamp"), "Spieler"); st.SetKampf(k); st.ShowDialog(); }
public MainViewModel() { WarhammerKampf = new Kampf(); this.AddGegCommand = new UserCommand(new Action <object>(AddGegner)); this.AddCharCommand = new UserCommand(new Action <object>(AddCharakter)); this.NaechsterCommand = new UserCommand(new Action <object>(Naechster)); this.AngriffsCommand = new UserCommand(new Action <object>(Angriff)); this.ButtonWuerfeln = new UserCommand(new Action <object>(Wuerfeln)); this.RemoveCommand = new UserCommand(new Action <object>(Remove)); }
public override void Execute(Kampf Kampf) { Start(); Kampf.Gui.ZieheFigur(this); }
public void SetKampf(Kampf Kampf) { this.Kampf = Kampf; }
public void SetKampf(Kampf Kampf) { this.Grafik.SetKampf(Kampf); }
public Gegner(Kampf kampf, int gegnernummer) { gegnerKarte = new GegnerKarte(gegnernummer, kampf); }
public void SetKampf(Kampf Kampf) { if (this.MyZustand != Zustand.KeinKampf) throw new NotImplementedException(); this.MyZustand = Zustand.Bereit; this.Kampf = Kampf; this.KampfBild.SetKampf(Kampf); this.ShowMenu(StartMenu); Timer.Enabled = true; UpdateKampf(); }