小编ale*_*tti的帖子

对于循环不工作

我正在测试for循环,以便在屏幕上平滑移动对象.

int yPosLeft = 339;
int originalYPosLeft = yPosLeft;

for(yPosLeft < 30 + originalYPosLeft; yPosLeft++) {
// Changes the value in the statement
}
Run Code Online (Sandbox Code Playgroud)

然而,循环以某种方式使对象的y位置永远进入负数百万,并且几乎需要强制退出.有什么建议?

更新:我对此很愚蠢.为#BrainFart #Fixed道歉

java for-loop

-4
推荐指数
1
解决办法
112
查看次数

标签 统计

for-loop ×1

java ×1