怎么在代码中改变字体的大小

creator中有个label组件,然后在代码中获取,之后怎么改变字体的大小?

有fontSize属性

我用的是vscode,比如说在代码中获取 this.node.getComponent(cc.Label).string = “你好”;
然后要怎么写实现“你好”这两个字体的大小设置?

this.node.getComponent(cc.Label).fontSize = XXX 多看文档啊

http://docs.cocos.com/creator/api/zh/classes/Label.html#fontsize

非常感谢,我看的不太仔细,然后之前写fontSize的时候没有自动补,我以为我写错了…