[SOLVED] LibGDX TextureAtlas, SpriteBatch combination - nothing displaying?

Ok, I’ve done a lot of looking and can’t really seem to find the answer I’m looking for. My code is at home, but I’ll explain what I’ve been trying to do.

Basically, I have balloons that are created dynamically based on the user’s level, which determines the number of balloons to be launched. In this case, however, I am seeing nothing being displayed on the screen. I have log entries that are created whenever a balloon is assigned and supposed to be drawn, but nothing appears.

I have all the textures for the balloons in a single texturepack.

So ignoring all the features of the balloon class, this is the approach which I had thought was the way to do it:

  • Load a textureatlas and assign it with the balloon.pack
  • Assign a sprite to one of the regions in the file.

call sprite.draw(batch); to draw the sprite on screen (in between batch.begin and batch.end)

Again, I apologise that I don’t have my code on hand but I was hoping that someone may have come across the same issue, but I guess what I’m probably more interested in is the best way to load a texture from a textureatlas, assign it to an entity (which has attributes regarding its position, etc.), and then draw it between spritebatch calls.

I have done a lot of looking but can’t seem to find anything specific to this situation regarding TextureAtlas, which I’m very surprised about. I’m sure I’m missing something obvious. Once I’m home I will post the code example but I am hoping that in the meantime someone will be able to decipher what I’m trying to explain and why I’m an idiot :slight_smile: