void Awake() { Director director = Director.getInstance(); director.currentScenceController = this; diskNumber = 10; this.gameObject.AddComponent <ScoreRecorder>(); this.gameObject.AddComponent <DiskFactory>(); scoreRecorder = Singleton <ScoreRecorder> .Instance; actionManager = new CCActionManager(); director.currentScenceController.LoadResources(); }
void awake() { Debug.Log("controllerawake!"); Debug.Log("lalal"); Director director = Director.getInstance(); director.currentScenceController = this; diskNumber = 10; //向挂载场景管理器的对象挂载分数记录和飞碟工厂 this.gameObject.AddComponent <ScoreRecorder>(); this.gameObject.AddComponent <DiskFactory>(); scoreRecorder = Singleton <ScoreRecorder> .Instance; director.currentScenceController.LoadResources(); }