Skip to content
Benedict Allen edited this page Nov 15, 2015 · 4 revisions

IAnimation Interface

The IAnimation interface adds methods to handle animations of attributes of an object.

Constructor

IAnimation:IAnimation()

Methods

addAnimation()

Animation animation = IAnimation:addAnimation( string label, function setter, Animation animation )

Adds an animation to be updated by the object. label should be a unique descriptive name, and used consistently for the particular property being animated to avoid conflicting animations. setter should be a function to set the property, and is called like setter( self, value ). animation should be the Animation object.

This returns the animation given.

stopAnimation()

Animation animation = IAnimation:stopAnimation( string label )

Stops the animation with the given label.

updateAnimations()

IAnimation:updateAnimations( number deltaTime )

This is method is called internally in Sheet:update() and Screen:update() Updates the animations of the object with the deltaTime given.

Clone this wiki locally