Class cc.ScaleTo
- Defined in: CCActionInterval.js
- Extends cc.ActionInterval
Constructor Attributes | Constructor Name and Description |
---|---|
cc.ScaleTo(duration, sx, sy)
Scales a cc.Node object to a zoom factor by modifying it's scale attribute.
|
Method Summary
Class Detail
cc.ScaleTo(duration, sx, sy)
Scales a cc.Node object to a zoom factor by modifying it's scale attribute.
// It scales to 0.5 in both X and Y. var actionTo = new cc.ScaleTo(2, 0.5); // It scales to 0.5 in x and 2 in Y var actionTo = new cc.ScaleTo(2, 0.5, 2);
- Parameters:
- {Number} duration
- {Number} sx
- scale parameter in X
- {Number} sy Optional
- scale parameter in Y, if Null equal to sx
Field Detail
Please use cc.scaleTo instead.
Scales a cc.Node object to a zoom factor by modifying it's scale attribute.
- Deprecated:
- since v3.0 please use cc.scaleTo instead.
Method Detail
-
{cc.ScaleTo} clone()returns a new clone of the action
- Returns:
- {cc.ScaleTo}
-
ctor(duration, sx, sy)Constructor function, override it to extend the construction behavior, remember to call "this._super()" in the extended "ctor" function.
- Parameters:
- {Number} duration
- {Number} sx
- scale parameter in X
- {Number} sy Optional
- scale parameter in Y, if Null equal to sx
-
{Boolean} initWithDuration(duration, sx, sy)Initializes the action.
- Parameters:
- {Number} duration
- {Number} sx
- {Number} sy Optional
- Returns:
- {Boolean}
-
startWithTarget(target)Start the action with target.
- Parameters:
- {cc.Node} target
-
update(dt)Called once per frame. Time is the number of seconds of a frame interval.
- Parameters:
- {Number} dt