利用竖直上抛公式解决小球鬼畜问题
if(Math.pow(balls[i].vy,2)/(2*balls[i].g)<6){
balls[i].y=WINDOW_HEIGHT-RADIUS;
balls[i].vy=0;
balls[i].g=0;
}
if(Math.pow(balls[i].vy,2)/(2*balls[i].g)<6){
balls[i].y=WINDOW_HEIGHT-RADIUS;
balls[i].vy=0;
balls[i].g=0;
}
2016-04-26