boardgame
boardgame copied to clipboard
Have a way to decide which animations to skip clientside
By default we render every state, and wait for any animations to finish. And every state is sent down.
But sometimes there are states we want to skip animating. For example if the user has picked "no animations" or there are just some moves that would animate but we want to skip animating on.
The game renderer will have its SkipAnimation(beforeMove, afterMove)
consulted (BaseGameRenderer has a stub that just returns false). If it's true, won't even databind the state, will just skip to the last one where SkipAnimation between it and its next state returns false.
Originally captured in #396.
- [x] update architecture.md
- [x] update the "client animations" section of TUTORIAL
- [ ] Should /info also return LastMove, so we have it in more cases?
- [ ] should delayAnimation also pass timeElapsedSinceLastBundleInstalled?
- [x] ideally renderer would be wired down into state game manager and not rely on it having been set before via readyForNextState