public void Jump(Shot shot) { if (y + height + ySpeed >= shot.GetY() && ((x >= shot.GetX() && x <= shot.GetX() + shot.GetWidth()) || (x + width >= shot.GetX() && x + width <= shot.GetX() + shot.GetWidth()))) { jumping = true; } else if (jumping || myGame.IsValidMove( x, y + height + ySpeed, x + width, y + height + ySpeed)) { return; } jumping = true; jumpXspeed = 0; }
// Reapear if shot's not exploded public void GetOutOfBubble() { if (myShot.GetTime() == 6) { x = myShot.GetX(); y = myShot.GetY(); xSpeed += 6; visible = true; isInBubble = false; } }