Hi I am making a small game (frogger), and I'm trying to make all of the water lethal to walk on. Anyways, I made a 2D boolean array called deathCoords[][] and i want to make all rows from row 7 to row 14 return true.
This is what I've written to fill the array from row 7 to row 14 with true.
deathCoords = new boolean[height][15];
for (int i = 7; i > 14; i++) {
for (int n = 0; n > height; n++) {
deathCoords[n][i] = true;
}
}
When i walk on top of the water it still returns false.
If i do this and walk on top on that spot it works:
deathCoords[0][0] = true;
Any way to fix this? Thanks
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…