阅读背景:

变量随机变化的价值。在简单的Android游戏中

来源:互联网 

I have this app game which, at the beginning, creates two 3x3 grids of squares. One of my functions setGridDimensions() goes in and assigns the min and max X/Y values for each square in the gird(based on the screen size). This is then used to draw the grid. The strange thing is that sometimes the x or y value of a square will get randomly switched with another square, resulting in holes in my grid. I can't seem to figure out why this is happening. Any help is appreciated. Note I do know the draw function works which is why it is not displayed. Something happens to the x/y values before it is called.I have this app game which, at the beginning, c




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

分享到: