问题1:
const {ccclass, property} = cc._decorator;
出错提示
[ts] Property ‘_decorator’ does not exist on type ‘typeof cc’.any
这个怎么弄?
问题2:
[ts]
Class ‘Test’ incorrectly extends base class ‘Component’.
Property ‘onLoad’ is protected in type ‘Test’ but public in type ‘Component’.
protected onLoad() 默认的方法,需要修改成 public onLoad()
这个是默认的问题,还是?
问题3:
在js中
node.getComponent(cc.Label).string = ‘xxx’;
但是在TS中,返回的是Component ,并没有string 属性。
这个是要强转吗?
问题4:
写好的TS在浏览器中可以,在模拟器中点了没反应。。。
请大神帮忙啊。。。。
