Skip to content

add Tileset#animating#7311

Closed
sylvainpolletvillard wants to merge 1 commit into
phaserjs:masterfrom
sylvainpolletvillard:tileset-animating-boolean
Closed

add Tileset#animating#7311
sylvainpolletvillard wants to merge 1 commit into
phaserjs:masterfrom
sylvainpolletvillard:tileset-animating-boolean

Conversation

@sylvainpolletvillard
Copy link
Copy Markdown
Contributor

Please do not update the README or Change Log, we will do this when we merge your PR.

This PR (delete as applicable)

  • Adds a new feature

Describe the changes below:

Adds a new field to Tileset class, Tileset.animating ; boolean ; whether the tileset animations should play or not. If false, animated tiles will stay on their first frame.

Phaser 4 supporting animated tilesets natively is very nice, but being able to propose an option to players to disable those background animations is important for accessibility reasons. I did not find a way to easily do that with current API so I added a field for that.

@sylvainpolletvillard
Copy link
Copy Markdown
Contributor Author

Just found the existing API I was looking for:

tilemap.layers.forEach(layer => {
   layer.tilemapLayer.setTimerPaused(true)
})

So now new feature is needed, I can close this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant