class System {
private static instance = null
static get single(): System{
if(!System.instance instanceof System){
System.instance = new System()
}
return Game.instance;
}
}
System.single调用
class System {
private static instance = null
static get single(): System{
if(!System.instance instanceof System){
System.instance = new System()
}
return Game.instance;
}
}
System.single调用