Esempio n. 1
0
 public bool TouchUP(Wall wall)
 {
     if (x + 25>=wall.x && y<=wall.y+wall.height  && x<wall.x+54)
     {
         return true;
     }
     return false;
 }
Esempio n. 2
0
        public void newGame()
        {
            exitGameBtn = true;
            timeStart = 3;
            timer1.Start();
            lblTimeStart.Visible = true;
            lblgameStartin.Visible = true;
            Score = 0;
            upWalls = new List<Wall>();
            downWalls = new List<Wall>();
            playersScore = new List<Player>();
            ball = new Ball(250, 200);
            wall = new Wall(600, 0, 200);
            upWalls.Add(wall);
            wall = new Wall(600, 325, this.Height - 65 - 200);
            downWalls.Add(wall);

            wall = new Wall(750, 0, 100);
            upWalls.Add(wall);
            wall = new Wall(750, 225, this.Height - 65 - 100);
            downWalls.Add(wall);

            wall = new Wall(900, 0, 220);
            upWalls.Add(wall);
            wall = new Wall(900, 345, this.Height - 65 - 220);
            downWalls.Add(wall);

            wall = new Wall(1050, 0, 80);
            upWalls.Add(wall);
            wall = new Wall(1050, 205, this.Height - 65 - 80);
            downWalls.Add(wall);
        }
Esempio n. 3
0
 public bool TouchDown(Wall wall)
 {
     if (x + 25 >= wall.x && y + 25 >= wall.y && x<wall.x+54)
     {
         return true;
     }
     return false;
 }