void checkBirdImpact(Colums colTemp) { //Lấy chim ra birdX = bird.getBird().Location.X; birdY = bird.getBird().Location.Y; //Cột dưới colBotomX = colTemp.getColBotom().Location.X; colBotomY = colTemp.getColBotom().Location.Y; if ( (colBotomX <= birdX + 33 && birdY + 28 >= colBotomY) && birdX <= colBotomX + 43 ) { timerColum.Enabled = false; timerOfBird.Enabled = false; } //Cột trên colTopX = colTemp.getColTop().Location.X; colTopY = colTemp.getColTop().Location.Y; if ( (colTopX <= birdX + 33 && birdY <= colTopY + colTemp.getColTop().Height) && birdX <= colTopX + 43 ) { timerColum.Enabled = false; timerOfBird.Enabled = false; } }
void columMove(Colums col) { col.getColBotom().Left -= 1; col.getColTop().Left -= 1; }