new Gamalto.BaseAnimation(sheet) Abstract object to create an animation sequence. It is not meant to be used directly. Parameters Name Type Description sheet Gamalto.SpriteSheet Sprites sheet containing the sections for the animation. Extends Gamalto.Animator Members length :number readonly Length of the animation in frames. loop :boolean Gets or sets the loop state of the animation. playing :boolean inherited readonly Whether the animation is playing. Inherited From Gamalto.Animator#playing progress :number inherited readonly Position in the duration array. Inherited From Gamalto.Animator#progress tag :object inherited Utility property to exchange data between objects. Inherited From Gamalto.Object#tag transform :Gamalto.Transform readonly Drawing transformation information. Methods clone() object override abstract Creates a clone of the current object. Overrides Gamalto.Animator#clone Returns Copy of the object. draw(renderer, x, y, frameopt) number Draws the current animation frame. Parameters Name Type Attributes Description renderer Gamalto.BaseRenderer Renderer of the Gamalto.surface to which the animation frame will be rendered. x number Horizontal drawing position. y number Vertical drawing position. frame number <optional> Index of the frame to draw. Usually, the frame index is internally calculated. Returns Drawn frame index. duplicateFrame(index, dest) Duplicates a frame including all its properties. Parameters Name Type Description index number Frame index. dest number New frame destination. reset() inherited Resets the animation. Inherited From Gamalto.Animator#reset setDuration(time) Sets the global duration of the animation, for the current animation content only. This will reset durations set with setFrameDuration() Parameters Name Type Description time number Duration in milliseconds. setFrameDuration(frame, time) Sets the local duration of a frame. Parameters Name Type Description frame number Frame index. time number setFrameOffset(frame, x, y) Sets the local drawing offset of a frame. It will be added to the global offset. Parameters Name Type Description frame number Frame index. x number Horizontal offset. y number Vertical offset. setOffset(x, y) Sets the global offset of the animation, for the current animation content only. Parameters Name Type Description x number Horizontal offset. y number Vertical offset. toString() string inherited abstract Converts the object into a string. Inherited From Gamalto.Object#toString Returns string update(timer) boolean Updates the animation state. Parameters Name Type Description timer Gamalto.ITiming Timer object from which the elpased time will be read. Returns Playing state.