cc.Class({ extends: cc.Component, properties: { }, damage(num) { this.node.width -= this.node.width*num/100; } });