Exemple #1
0
        private void frametimer_Tick(object sender, System.EventArgs e)
        {
            CheckInputs();
            player1.UpdateJump();
            player1.UpdateTongue();
            player1.CheckCollisions();
            lblP1.Text = player1.points.ToString();

            if (players > 1)
            {
                player2.UpdateJump();
                player2.UpdateTongue();
                player2.CheckCollisions();
                lblP2.Text = player2.points.ToString();
            }

            if (players == 3)
            {
                player3.UpdateJump();
                player3.UpdateTongue();
                player3.CheckCollisions();
                lblP3.Text = player3.points.ToString();
            }

            flies.RemoveEaten();
            flies.Move();

            Invalidate(true);
        }