cocos2d-x
cocos2d-x copied to clipboard
setAnimation bugs, cannot change animation
- cocos2d-x version: 4.0
- devices test on: Windows 11
- developing environments
- NDK version: no
- Xcode version: no
- VS version: VS Community 2019
- browser type and version:
Steps to Reproduce:
- set up an animate action on sprite using an animation of 4 sprites(in my case).
- call setAnimation using another animation of 6 sprites or more.
- build and run then it will cause out_of_range exception at _splitTime in Animate::update
I think that _splitTime is not updated to match new animation timing, so it causes an exception on new animation.