属性【block可以是任何名称】
cc.Class({
extends: cc.Component,
properties: {
block:cc.Node,
...
}
获取附着脚本的组件的宽高/坐标方法:(需要加Node)
this.node.width
this.node.height
this.node.x
this.node.y
获取properties中组件的宽高/坐标方法:(不用加Node)
this.block.width
this.block.height
this.block.x
this.block.y