public class Team {
public int health;
public int x;
public int conflict;
}
public class Test extends Activity {
Team enemy[] = new Team[50];
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
for(int i =0; i<enemy.length; i++){
enemy[i].health = 0;
enemy[i].x = -100;
enemy[i].conflict = 0;
}
}
}
With the for loop my game crashes, without the for loop it run. What am I doing wrong? thanks for the help ahead of time!