Sol.animation.Move

From Runes of Magic Wiki - The Runes of Magic

Jump to: navigation, search
Sol.animation.Move = function(addonName, frame, moveToX, moveToY, fps, time, onUpdateFnName)


Animates a movement of a frame.

Note: This uses Sol.timers.ScheduleTimer. Please see the notes for that
function as they pertain to this one, as well.

Parameters:
+ addonName      - Your addon's name
+ frame          - Frame to fade
+ moveToX        - The x position to gradually move toward. Defaults to 0
+ moveToY        - The y position to gradually change toward. Defaults to 0
+ fps            - How many frames per second to use for the animation
                   Defaults to Sol.constants.DEFAULT_FPS
+ time           - How much time to take for the animation
                   Defaults to Sol.constants.DEFAULT_ANIMATION_TIME
+ onUpdateFnName - The name of the OnUpdate handler to use (optional)
                   Defaults to <addonName>_OnUpdate
                   
Returns:
+ true if the animation was setup successfully; else false

Post:
+ The frame will gradually move toward the specified position
Personal tools