阅读背景:

Java - 在与播放器发生冲突时从数组中删除对象

来源:互联网 

Im working on a falling blocks game in java where you have to move the player around the screen to dodge the blocks. Whenever you get hit by a block, depending on the block type, it will either decrease or increase a int in the player class. Im having the problem that when the player is hit by the block the int keeps going down until the now invisible block is offscreen. Basically I just need a way to check through a object array and when a object meets a specified condition such as (delete == true) it will set the current position of that block in the array to null.Im working on a falling blocks game in java whe




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: