void Awake() { if (!SingletonMonoBehaviour <ObjectPool> .DestroyExtraObjects(gameObject)) { Init(); } }
void Awake() { if (!SingletonMonoBehaviour <FPSUI> .DestroyExtraObjects(this)) { frameCounter = 0; } }
// // 玩家配置 // protected UserPreferenceProxy userPreferenceProxy; // protected virtual UserPreferenceProxy TheUserPreferenceProxy // { // get{ // if(userPreferenceProxy==null) // { // userPreferenceProxy = ApplicationFacade.RetrieveProxy (UserPreferenceProxy.defaultProxyName) as UserPreferenceProxy; // } // return userPreferenceProxy; // } // } // Use this for initialization void Awake() { SingletonMonoBehaviour <AudioController> .DestroyExtraObjects(gameObject); // 启动时 创建背景音乐的声源 if (BGMSource == null) { var bgmObj = Instantiate(PredefinedAudioObject); bgmObj.transform.parent = transform; BGMSource = bgmObj.GetComponent <TDAudioSource> (); } }
void Awake() { if (!SingletonMonoBehaviour <QualityManager> .DestroyExtraObjects(this)) { } }