Merge pull request #13378 from jianglong0156/fixNodeGrid

[ci skip]add NodeGrid bind
This commit is contained in:
pandamicro 2015-08-15 21:43:00 +08:00
commit 487c99e632
1 changed files with 24 additions and 0 deletions

View File

@ -2693,6 +2693,30 @@ _p.unscheduleUpdateForTarget = _p.unscheduleUpdate;
_p.unscheduleAllCallbacksForTarget = _p.unscheduleAllForTarget;
cc._NodeGrid = cc.NodeGrid;
cc.NodeGrid = function(rect){
if (!(this instanceof cc.NodeGrid)){
cc.error("NodeGrid's constructor can not be called as a function, please use 'new cc.NodeGrid()'");
return;
}
if (rect) {
return cc._NodeGrid.create(rect);
}
else {
return cc._NodeGrid.create();
}
}
cc.NodeGrid.create = function(rect){
if (rect) {
return cc._NodeGrid.create(rect);
}
else {
return cc._NodeGrid.create();
}
}
//
// cc.BlendFunc
//