2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
|
|
|
-- @module Action
|
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
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Called before the action start. It will also set the target. <br>
|
|
|
|
-- param target A certain target.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Action] startWithTarget
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #cc.Node target
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Action#Action self (return value: cc.Action)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Set the original target, since target can be nil.<br>
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Is the target that were used to run the action. Unless you are doing something complex, like ActionManager, you should NOT call this method.<br>
|
|
|
|
-- The target is 'assigned', it is not 'retained'.<br>
|
2015-03-19 11:55:42 +08:00
|
|
|
-- since v0.8.2<br>
|
|
|
|
-- param originalTarget Is 'assigned', it is not 'retained'.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Action] setOriginalTarget
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #cc.Node originalTarget
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Action#Action self (return value: cc.Action)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Returns a clone of action.<br>
|
|
|
|
-- return A clone action.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Action] clone
|
|
|
|
-- @param self
|
|
|
|
-- @return Action#Action ret (return value: cc.Action)
|
|
|
|
|
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Return a original Target. <br>
|
|
|
|
-- return A original Target.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Action] getOriginalTarget
|
|
|
|
-- @param self
|
|
|
|
-- @return Node#Node ret (return value: cc.Node)
|
|
|
|
|
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Called after the action has finished. It will set the 'target' to nil.<br>
|
|
|
|
-- IMPORTANT: You should never call "Action::stop()" manually. Instead, use: "target->stopAction(action);".
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Action] stop
|
|
|
|
-- @param self
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Action#Action self (return value: cc.Action)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Called once per frame. time a value between 0 and 1.<br>
|
|
|
|
-- For example:<br>
|
|
|
|
-- - 0 Means that the action just started.<br>
|
|
|
|
-- - 0.5 Means that the action is in the middle.<br>
|
|
|
|
-- - 1 Means that the action is over.<br>
|
|
|
|
-- param time A value between 0 and 1.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Action] update
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #float time
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Action#Action self (return value: cc.Action)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-27 13:46:01 +08:00
|
|
|
-- Return certain target.<br>
|
2015-03-19 11:55:42 +08:00
|
|
|
-- return A certain target.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Action] getTarget
|
|
|
|
-- @param self
|
|
|
|
-- @return Node#Node ret (return value: cc.Node)
|
|
|
|
|
2015-07-13 22:41:58 +08:00
|
|
|
--------------------------------
|
|
|
|
-- Returns a flag field that is used to group the actions easily.<br>
|
|
|
|
-- return A tag.
|
|
|
|
-- @function [parent=#Action] getFlags
|
|
|
|
-- @param self
|
|
|
|
-- @return unsigned int#unsigned int ret (return value: unsigned int)
|
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Called every frame with it's delta time, dt in seconds. DON'T override unless you know what you are doing. <br>
|
|
|
|
-- param dt In seconds.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Action] step
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #float dt
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Action#Action self (return value: cc.Action)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Changes the tag that is used to identify the action easily. <br>
|
|
|
|
-- param tag Used to identify the action easily.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Action] setTag
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #int tag
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Action#Action self (return value: cc.Action)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-07-13 22:41:58 +08:00
|
|
|
-- Changes the flag field that is used to group the actions easily.<br>
|
|
|
|
-- param tag Used to identify the action easily.
|
|
|
|
-- @function [parent=#Action] setFlags
|
|
|
|
-- @param self
|
|
|
|
-- @param #unsigned int flags
|
|
|
|
-- @return Action#Action self (return value: cc.Action)
|
|
|
|
|
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Returns a tag that is used to identify the action easily. <br>
|
|
|
|
-- return A tag.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Action] getTag
|
|
|
|
-- @param self
|
|
|
|
-- @return int#int ret (return value: int)
|
|
|
|
|
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- The action will modify the target properties. <br>
|
|
|
|
-- param target A certain target.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Action] setTarget
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #cc.Node target
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Action#Action self (return value: cc.Action)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Return true if the action has finished. <br>
|
|
|
|
-- return Is true if the action has finished.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Action] isDone
|
|
|
|
-- @param self
|
|
|
|
-- @return bool#bool ret (return value: bool)
|
|
|
|
|
|
|
|
--------------------------------
|
2016-01-28 12:01:53 +08:00
|
|
|
-- Returns a new action that performs the exact reverse of the action. <br>
|
|
|
|
-- return A new action that performs the exact reverse of the action.<br>
|
2015-03-19 20:30:15 +08:00
|
|
|
-- js NA
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Action] reverse
|
|
|
|
-- @param self
|
|
|
|
-- @return Action#Action ret (return value: cc.Action)
|
|
|
|
|
|
|
|
return nil
|