Semi
  • Initial page
  • Why Semi?
  • Beginner's Guide
    • Brief Description
    • Setting up the Software
    • Setting up the Mod Template
    • Development Branch
    • Debugging
  • Guides
    • Adding an Item
  • Writing Mods
    • File Hierarchy
    • Metadata
    • Structure of a Mod
    • Events and Order
    • ID System
  • Spriting
    • Structure of a Sprite
    • Structure of an Animation
    • Semi Format: Sprite Collection
    • Semi Format: Sprite Animation
    • Semi Format: Editor Support
Powered by GitBook
On this page

Was this helpful?

  1. Spriting

Structure of an Animation

While sprites are relatively complex with the collections, definitions, UV mappings etc., animations build on top of this and their structure is significantly less complicated. Animations work together with tk2dBaseSpritecomponents.

An "animation", that is, a moving picture, is accomplished by the class tk2dSpriteAnimationClip. This object contains a list of tk2dSpriteAnimationFrames, and each one of those contains the name of the sprite definition to use and some other minor details (such as whether the player should be invulnerable during this frame, if this animation is used as the player's animation).

tk2dSpriteAnimationClips combine into the tk2dSpriteAnimation class, which provides a list of clips tagged by name along with things such as the FPS that the animation should be played at. If you want to actually give a game object this animation, the final important type is a component called tk2dSpriteAnimator, which contains pretty much nothing more than a reference to the tk2dSpriteAnimation (which is not a component).

Of course, just like with sprites, Semi contains a lot of useful API features regarding animations, including a separate (but similar) format for animations, which will be shown in more detail on the next pages in this section.

PreviousStructure of a SpriteNextSemi Format: Sprite Collection

Last updated 5 years ago

Was this helpful?