这样扩展Node 也是一种思路,有时候可以省很多定义的事,少很多Component,不过这样就隐晦很多
记录一下
c.Class({
extends: cc.Node,
properties: {
},
// LIFE-CYCLE CALLBACKS:
// onLoad () {},
start () {
},
init : function(parent, sp){
this.sprite = sp;
console.log(this);
this.parent = cc.director.getScene();
this.anchorX = 0;
this.anchorY = 0;
},
}