module game {
export class TestA {
callB(){
console.log(“TestA ########”);
let a = new game.TestB();
a.helloB();
}
}
}
module game {
export class TestB {
helloB(){
console.log(“aa i am TestB”);
}
}
}
我在另一个文件里怎么用
import Player from “./Player”;
import ScoreFX from “./ScoreFX”;
import Star from “./Star”;
const {ccclass, property} = cc._decorator;
@ccclass
export default class NewScript extends cc.Component {
onLoad () {
let aaa = new game.TestA();
aaa.callB();
}
}