Esempio n. 1
0
        private void SpielStart()
        {
            Punkte         = 0;
            txtPunkte.Text = Punkte.ToString();
            var rand = new Zufallsmethoden();

            picBall.Location = new Point(rand.ErzeugeZufallszahl(0, pnlSpiel.Width - picBall.Width), rand.ErzeugeZufallszahl(0, (pnlSpiel.Height - picBall.Height)));
        }
Esempio n. 2
0
        private void txtPunkte_TextChanged(object sender, EventArgs e)
        {
            if (Convert.ToInt32(txtPunkte.Text) % 50 == 0 & Convert.ToInt32(txtPunkte.Text) != 0)
            {
                var rand = new Zufallsmethoden();
                picBall.BackColor = rand.ErzeugeZufallsfarbe();

                if (Geschwindigkeit >= 5)
                {
                    Geschwindigkeit = Geschwindigkeit - 5;
                }
            }
        }