You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a sub sprite extends AngleSprite, and override step function to perform
animation like this:
public void step(float secondsElapsed)
{
if(frame == roLayout.roFrameCount)
{
frame = 0;
}
setFrame(frame++);
super.step(secondsElapsed);
}
it works well for a short while, but then after a while my sprite disappears
unexpectedly, I print the mAlpha in Logcat, it always equals 1.
And I'm sure my frame doesn't overstep roFrameCount.
Get confused why my sprite invisible suddenly
Original issue reported on code.google.com by rayjun...@gmail.com on 10 Sep 2010 at 6:05
The text was updated successfully, but these errors were encountered:
There isn't any reason for that.
Your code is simple. An infinite unsynchronized animation loop.
If you are sure your object will don't have any children object you can not
call super.step
Can you reproduce this issue always?
Original comment by ipaju...@gmail.com on 16 Sep 2010 at 8:20
I noticed your texture's dimension isn't power of 2.
On my hero, I can't load textures that aren't power of 2. Maybe your device can
render these textures but fail after a while.
Try to use power of 2 compatible textures. With the attached texture, your
sample run fine forever on my hero.
Original comment by ipaju...@gmail.com on 19 Sep 2010 at 9:15
Original issue reported on code.google.com by
rayjun...@gmail.com
on 10 Sep 2010 at 6:05The text was updated successfully, but these errors were encountered: