[]ts项目,我在程序主入口声明了公共静态类,下面new出了一个对象,把他添加到舞台中出错。
public static GameStart:GameStart;
GameMain.GameStart=new GameStart();
Laya.stage.addChild(GameMain.GameStart);
报错:file: 'file:///e%3A/LAYABOX/CaiCi/src/GameMain.ts'
severity: '错误'
message: 'Argument of type 'GameStart' is not assignable to parameter of type 'Node'.
Property '_childs' is missing in type 'GameStart'.'
at: '56,29'
source: 'ts'
GameMain.GameStart=new GameStart();
Laya.stage.addChild(GameMain.GameStart);
报错:file: 'file:///e%3A/LAYABOX/CaiCi/src/GameMain.ts'
severity: '错误'
message: 'Argument of type 'GameStart' is not assignable to parameter of type 'Node'.
Property '_childs' is missing in type 'GameStart'.'
at: '56,29'
source: 'ts'
没有找到相关结果
已邀请:
2 个回复
cuixueying
赞同来自:
zjz1994
赞同来自: cuixueying