FindClass / rokon

Automatically exported from code.google.com/p/rokon
BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

the physicalSprite added on the layer, the object already exists, but does not show #159

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.I repeat cleaning all physicalSprite objects of layer 1, and then add some 
physicalSprite objects(more than 20) some times.
2.I trace the physicalSprite objects' isOnScreen() and isVisible(),all I want 
the physicalSprite object's to be shown,which visible is true,but some objects' 
isOnScreen is false,and these objects don't show.
3.So I override the physicalSprite class, and modify the method isOnScreen like:
public class MyPhysicalSprite extends PhysicalSprite {

    public MyPhysicalSprite(float x, float y, float width, float height) {
        super(x, y, width, height);
        // TODO Auto-generated constructor stub
    }

    public boolean isOnScreen()
    {
        return true;
    }
}

and I trace those objects' isOnScreen() which is always true. but some objects 
don't show like before.

What is the expected output?
all the physicalSprite objects can be shown.

What do you see instead?
just occasionally some objects can't be shown.

What version of Rokon are you using?
the latest code from svn and generate the jar file.

On which version of Android are you experiencing this?
the latest code version.

Please provide any additional information below.

Original issue reported on code.google.com by ljq981...@gmail.com on 8 Sep 2010 at 5:49

GoogleCodeExporter commented 9 years ago
Check you have enough room in your layer sprite counts?

What version are you using?

Original comment by rtaylor205@gmail.com on 13 Sep 2010 at 7:55

GoogleCodeExporter commented 9 years ago
Now I have set the count with 256(layer maximum sprites number), and all sprite 
can be shown normal.

because the count of all the sprites I added to the layer less than 256. but 
every time,I will clear this layer,and add the other sprites, the number of 
these sprites less than 50.

I don't know why. maybe clear the layer, some sprites were not clean in time, 
and will rely on the system.gc???? 

Original comment by ljq981...@gmail.com on 17 Sep 2010 at 7:46