摘要:
private function onEnterFrame(event:Event):void { for (var i:uint = 0; i stage.stageWidth) { ball.x = stage.stageWidth - ball.radius; ball.vx *= bou... 阅读全文
摘要:
1)何时停止缓动:private function onEnterFrame(event : Event) : void {var dx:Number = targetX - ball.x;if (Math.abs(dx) < 1){ball.x = targetX;removeEventList... 阅读全文
摘要:
1)力作用于速度,而不是距离:vx += ax;vy += ay;ball.x += vx;ball.y += vy; 2) 反弹:if(ball.x + ball.radius > right){ball.x = right - ball.radius;vx *= -1; (无能量损失,如果有... 阅读全文