mirror of https://github.com/axmolengine/axmol.git
Merge pull request #13378 from jianglong0156/fixNodeGrid
[ci skip]add NodeGrid bind
This commit is contained in:
commit
487c99e632
|
@ -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
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue