2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
|
|
|
-- @module Animation
|
2014-03-20 10:21:28 +08:00
|
|
|
-- @extend Ref
|
2014-06-25 17:36:50 +08:00
|
|
|
-- @parent_module cc
|
2014-03-18 15:55:30 +08:00
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Gets the times the animation is going to loop. 0 means animation is not animated. 1, animation is executed one time, ...
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Animation] getLoops
|
|
|
|
-- @param self
|
|
|
|
-- @return unsigned int#unsigned int ret (return value: unsigned int)
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Adds a SpriteFrame to a Animation.<br>
|
|
|
|
-- The frame will be added with one "delay unit".
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Animation] addSpriteFrame
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #cc.SpriteFrame frame
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Animation#Animation self (return value: cc.Animation)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Sets whether to restore the original frame when animation finishes
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Animation] setRestoreOriginalFrame
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #bool restoreOriginalFrame
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Animation#Animation self (return value: cc.Animation)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Animation] clone
|
|
|
|
-- @param self
|
|
|
|
-- @return Animation#Animation ret (return value: cc.Animation)
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Gets the duration in seconds of the whole animation. It is the result of totalDelayUnits * delayPerUnit
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Animation] getDuration
|
|
|
|
-- @param self
|
|
|
|
-- @return float#float ret (return value: float)
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Sets the array of AnimationFrames
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Animation] setFrames
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #array_table frames
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Animation#Animation self (return value: cc.Animation)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Gets the array of AnimationFrames
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Animation] getFrames
|
|
|
|
-- @param self
|
|
|
|
-- @return array_table#array_table ret (return value: array_table)
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Sets the times the animation is going to loop. 0 means animation is not animated. 1, animation is executed one time, ...
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Animation] setLoops
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #unsigned int loops
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Animation#Animation self (return value: cc.Animation)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Sets the delay in seconds of the "delay unit"
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Animation] setDelayPerUnit
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #float delayPerUnit
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Animation#Animation self (return value: cc.Animation)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Adds a frame with an image filename. Internally it will create a SpriteFrame and it will add it.<br>
|
|
|
|
-- The frame will be added with one "delay unit".<br>
|
|
|
|
-- Added to facilitate the migration from v0.8 to v0.9.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Animation] addSpriteFrameWithFile
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #string filename
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Animation#Animation self (return value: cc.Animation)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Gets the total Delay units of the Animation.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Animation] getTotalDelayUnits
|
|
|
|
-- @param self
|
|
|
|
-- @return float#float ret (return value: float)
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Gets the delay in seconds of the "delay unit"
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Animation] getDelayPerUnit
|
|
|
|
-- @param self
|
|
|
|
-- @return float#float ret (return value: float)
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Checks whether to restore the original frame when animation finishes.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Animation] getRestoreOriginalFrame
|
|
|
|
-- @param self
|
|
|
|
-- @return bool#bool ret (return value: bool)
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Adds a frame with a texture and a rect. Internally it will create a SpriteFrame and it will add it.<br>
|
|
|
|
-- The frame will be added with one "delay unit".<br>
|
|
|
|
-- Added to facilitate the migration from v0.8 to v0.9.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Animation] addSpriteFrameWithTexture
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #cc.Texture2D pobTexture
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @param #rect_table rect
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Animation#Animation self (return value: cc.Animation)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-07-17 10:28:34 +08:00
|
|
|
-- @overload self, array_table, float, unsigned int
|
|
|
|
-- @overload self
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Animation] create
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #array_table arrayOfAnimationFrameNames
|
|
|
|
-- @param #float delayPerUnit
|
|
|
|
-- @param #unsigned int loops
|
2014-10-17 22:56:22 +08:00
|
|
|
-- @return Animation#Animation ret (return value: cc.Animation)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Animation] createWithSpriteFrames
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #array_table arrayOfSpriteFrameNames
|
|
|
|
-- @param #float delay
|
|
|
|
-- @param #unsigned int loops
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @return Animation#Animation ret (return value: cc.Animation)
|
|
|
|
|
|
|
|
return nil
|