public void Cross(ArcanoidPlayerBoat boat)
 {
     if (IsCircleToRect(boat.x, boat.y, boat.w, boat.h))
     {
         ChageSpeedIfCross(boat.x, boat.y, boat.w, boat.h);
     }
 }
Beispiel #2
0
        private void Restart()
        {
            List <ArcanoidBrick> bricks = new List <ArcanoidBrick>();

            for (int j = 0; j < 3; j++)
            {
                for (int i = 0; i < 8; i++)
                {
                    bricks.Add(new ArcanoidBrick(70 * i, 25 * j));
                }
            }
            this.bricks  = bricks;
            this.ball    = new ArcanoidBall(220, 555, 10);
            this.boat    = new ArcanoidPlayerBoat();
            this.points  = 0;
            btRestart    = new Button();
            btHightScore = new Button();
        }