Boards equals 0
i have 1 problem with int boards. When I'm adding a new int in while loop
all of int equals 0.
public class Enemy extends Render {
private int X[] = new int[64];
private int Y[] = new int[64];
private int i = 1;
public Enemy(int x, int y, int num1, int num2) {
//x = 480, y = 360, num2 = 2
X[num1-1] = x;
Y[num1-1] = y;
while(i <= num2) {
System.out.println(X[0]+" "+Y[0]+" "+X[1]+" "+Y[1]);
i++;
}
i = 1;
}
}
1st and 2nd line of output equals 480 360 0 0, next output equals 0 0 30
360 I need to have 480 360 480 360 pls help.
No comments:
Post a Comment