I have a slight problem where i might need some help/ideas. I know the generic check whereby i set the onUpdate to check if my sprite is out of the screen via
If Sprite.getX > camera width and remove it.
However, that will not work in my case.
My sprites are being generated via a time handler and then set to move from point A to point B (A being bottom of the screen to B being top of the screen). This is done so through a moveModifier.
Unfortunately in order to generate the idea of already have a constant motion, i spawn the sprites outside, so they appear to be zooming into the scene.
E.g. Game is in portrait mode, Camera width being 0 to 480 and height being 0 to 800.
The coordinates are spawned randomly at e.g. (33, 810)
In this case, the point A is slightly outside the bottom of the screen and point B would be (33, -20) point B would be slightly outside the top of the screen.
When moveModifier is activated it starts to move the sprite.
But by putting the out of the screen at the top of the onUpdate, it checks it every frame. Thus when the sprite is moving from pointA (33, 810) to become visible at (33, 800), the sprite itself is removed before being visible.
What i need to know if is there is anyway to prevent this removal BEFORE moveModifer is finished, OR to if there is another way to do it.
Thanks!