Exemplo n.º 1
0
 private void GegnerAktualisieren(object sender, System.EventArgs e)
 {
     KAMPF.GetGegnerListe()[GEGNERNUMMER].setName(this.textBox_Spielername.Text);
     KAMPF.GetGegnerListe()[GEGNERNUMMER].setAktLebel(Convert.ToInt32(this.numericUpDown_Leben.Value));
     KAMPF.GetGegnerListe()[GEGNERNUMMER].setAusdauer(Convert.ToInt32(this.numericUpDown_Ausdauer.Value));
     KAMPF.GetGegnerListe()[GEGNERNUMMER].setAngriffswert(Convert.ToInt32(this.numericUpDown_Angriff.Value));
 }
Exemplo n.º 2
0
        private void GegnerKartenPositionieren()
        {
            int YOFFSET = 80;

            int platzFürLinks = 0;
            int yZähler       = 30;

            while (true)
            {
                if ((yZähler + YOFFSET) < this.Height)
                {
                    yZähler += YOFFSET;
                    platzFürLinks++;
                }
                else
                {
                    break;
                }
            }

            int X;
            int Y;
            int anzahlLinks  = 0;
            int anzahlRechts = 0;

            for (int i = 1; i < Kampf.GetGegnerListe().Count + 1; i++)
            {
                Boolean hatPlatz = i <= platzFürLinks;
                if (hatPlatz)
                {
                    X = 10;
                    Y = (i - 1) * YOFFSET;
                    anzahlLinks++;
                }
                else
                {
                    X = 540;
                    Y = ((i - 1) - platzFürLinks) * YOFFSET;
                    anzahlRechts++;
                }
                Kampf.GetGegnerListe()[i - 1].GetGegnerKarte().Location = new Point(X, Y);
            }

            Buttons_SetLocation(platzFürLinks, anzahlLinks, anzahlRechts);
        }