android - Can I move sprite more smoothly in AndEngine? -
here code.
mainscene pscene; public progressbar(float px, float py, itextureregion ptextureregion, vertexbufferobjectmanager pvertexbufferobjectmanager, mainscene pscene) { super(px, py, ptextureregion, pvertexbufferobjectmanager); this.pscene = pscene; } @override protected void onmanagedupdate(final float psecondselapsed){ super.onmanagedupdate(psecondselapsed); this.mx += pscene.barspeed; if(this.mx > 610){ this.mx = 100; } }
it moves well, problem when use code, sprites can never @ same place bar. (for example, when barspeed 7, sprite on (105, 30) can never meet bar)
i need move sprite more smoothly, means moves pixel pixel, sprite can touch sprites. , bar must have codes can control speed.
Comments
Post a Comment