private static EntitySprite createSprite(final Object owner) { final EntitySprite entitySprite = EntitySprite.Factory.newPooledInstance(); entitySprite.m_owner = owner; final GeometrySprite geom = ((MemoryObject.ObjectFactory<GeometrySprite>) GLGeometrySprite.Factory).newPooledInstance(); entitySprite.setGeometry(geom); geom.removeReference(); return entitySprite; }
public void translateMeshes(final float x, final float y) { for (int i = 0, size = this.m_meshes.size(); i < size; ++i) { final EntitySprite sprite = this.m_meshes.get(i); sprite.setTopLeft(sprite.getTop() - y, sprite.getLeft() - x); final EntitySprite sprite2 = this.m_overlayMeshes.get(i); sprite2.setTopLeft(sprite2.getTop() - y, sprite2.getLeft() - x); } }