i'm using latest version of andengine, , i'm wondering better make several update handlers different things or make 1 , calculate elapsed time?
gameengine.registerupdatehandler(new timerhandler(0.2f, true, new itimercallback() { // create new bullet } gameengine.registerupdatehandler(new timerhandler(0.2f, true, new itimercallback() { // create new bonus } gameengine.registerupdatehandler(new timerhandler(1f, true, new itimercallback() { // create new asteroid } gameengine.registerupdatehandler(new timerhandler(0.2f, true, new itimercallback() { // calculate elapsed time , create objects }
i using separate updatehandler. not sake of performance or but, scalablity of software. adapting , updating code often. using separate handler easily... adding new objects , more important deleting objects easier(in case bullets or asteroids)...
Comments
Post a Comment