Pause animation during game

I’m using Tiled with LibGDX and I have some animated tiles. When the game is paused I would like their animation to also be paused. Is this possible?

This isn’t anything particular to Tiled, the answer depends entirely on your game’s engine. Ask on the LibGDX forums. Or, if you use a 3rd party tool to import Tiled files, ask the devs/community of that.

Chances are though, there’s some update function that gets called on your maps every tick. Put a check for the game being paused before that (or, depending on exactly what you need paused, maybe somewhere higher up the chain, e.g. don’t update the entire level at all and only update menus).

1 Like