public static bool check_touch_bar(Ball ball, SlideBar bar) { if ((ball.Top + ball.Height >= bar.Top) && (ball.Location.X <= bar.Location.X + bar.Width) && (ball.Location.X >= bar.Location.X)) { return(true); } return(false); }
public static bool check_lose(Ball ball, Form form, SlideBar bar) { if (ball.Location.Y >= bar.Location.Y + bar.Height + 25) { return(true); } return(false); }