The speed of my game does not change at all and I'm not sure exactly why. Could there be a stack overflow occurring? I would supply my code but I have done so much it would be hard to find where any possible error could be at the moment.


1 2 | timer = (timer+ 1 )%(frameCount*frameActs); setImage(images[timer/frameActs]); |
1 2 | timer = (timer+ 1 )%(frameCount*frameActs); if (timer%frameActs == 0 ) setImage(images[timer/frameActs]); |
1 | setImage(imgs[i% 16 ]); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | public void act() { health(); if (isAttacking()&&!round.isCompleted()) { timer= (timer+ 1 )%( 16 * 10 ); if (timer% 10 == 0 ) setImage(imgs[timer/ 16 ]); if (timer==imgs.length- 1 ) //timer=0; damage(); } else if (round.isCompleted())move( 1 ); if (getX()>= 1695 )getWorld().removeObject( this ); else if (isTouching(EnemyDamageField. class )){ hb.subtract( 1 ); } despawn(); } |
1 | if (timer == 0 ) |