373839404142434445
Session session = (Session) msg.getObject(); if(session.type().equals(Type.B) ) { bloods.get(0).updateBlood(session.bloodView()); } else if(session.type().equals(Type.E)) { explodes.add(new Explode(session.explodeView())); } }
171172173174175176177178179180181
tank.draw(g); } if(!myTank.isLive() && myTank.isExplode()){ myExplode = new Explode(myTank.getX(), myTank.getY(), myTank.getId()); comm.replicateExplode(myExplode.getView()); myTank.setExplode(false); } paintExplode(g);
195196197198199200201202203204205206207208
} } int size = comm.getExplodes().size(); for(int i = 0 ; i < size ; i ++ ) { Explode e = comm.getExplodes().get(i); e.draw(g); if(!e.isLive()) { comm.getExplodes().remove(i); } } }