Tag Info

New answers tagged

0

if yow saw this pop up while you start to run your code just click your main class which contains your main method


0

All collision detection methods can benefit from pruning the list of objects to test before testing. One of the ways is to partition your world so you can query the objects that may intersect with some area (false positives are allowed) then only do the collision test on those objects. For example store the axis aligned bounding box in a grid and knowing ...


0

for (int i = 0; i < wallList.size(); i++) { Wall wall = wallList.get(i); wall.update(); if (wall.getX() < -1 * wall.getImageWidth()) { wallList.remove(i); } } If you remove a wall then the next wall at index i but you skip it. Decrement i after the remove or use an iterator based loop: for ...


0

Solved it. The second line below fixes the problem (I included the first for clarity). By default, if the emitter completes its cycle it is removed from the ParticleSystem. Disabling automatic removal means that you can restart the emitter. (From my shipflame class) system = new ParticleSystem(image, 10000); system.setRemoveCompletedEmitters(false); ...



Top 50 recent answers are included