Class cc.Follow#ctor

Class Summary
Constructor Attributes Constructor Name and Description
 
cc.Follow#ctor(followedNode, rect)
creates the action with a set boundary
creates the action with no boundary set

Class Detail

cc.Follow#ctor(followedNode, rect)
creates the action with a set boundary
creates the action with no boundary set
// example
// creates the action with a set boundary
var sprite = new cc.Sprite("spriteFileName");
var followAction = new cc.Follow(sprite, cc.rect(0, 0, s.width * 2 - 100, s.height));
this.runAction(followAction);

// creates the action with no boundary set
var sprite = new cc.Sprite("spriteFileName");
var followAction = new cc.Follow(sprite);
this.runAction(followAction);
Parameters:
{cc.Node} followedNode
{cc.Rect} rect