- Home /
2D Animated tile synchronization
I have made a custom Tilebase that functions as an Animated tile with a reference to another tile. I can create one of these tiles with multiple frames and one with only one frame, and set their references to each other. This way, I can switch out the static tile for the animated tile to control the animation.
All of my (tile) animations run at 12 fps. I would like to be able to switch the tiles exactly in sync with the animations. More specifically, the goal is to switch out the static tile with an animated tile at a given frame and then switch it back as soon as the animation is over.
I have no idea how this is most effectively done. Is it possible to keep an invokeRepeat synchronized with the tile animation? Is putting the code in FixedUpdate possible or recommended?
Thanks in advance for any help provided :)