Iterator it = this.hero.shs.iterator();
Shot st = null;
EnemyTank et = null;
Iterator itet = this.ets.iterator();
while (it.hasNext()) {
st = (Shot) it.next();
if(st.isLive){
while (itet.hasNext()) {
et = (EnemyTank) itet.next();
if(et.isLive){
isStrike(et, st);
}
}
}
}
这段代码是判断一个敌人是人坦克是否被我的子弹打中的可是每当我打第三个坦克时它就报这样一异常看截图