Пример #1
0
 void Awake()
 {
     if (!SingletonMonoBehaviour <ObjectPool> .DestroyExtraObjects(gameObject))
     {
         Init();
     }
 }
Пример #2
0
 void Awake()
 {
     if (!SingletonMonoBehaviour <FPSUI> .DestroyExtraObjects(this))
     {
         frameCounter = 0;
     }
 }
Пример #3
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> ();
        }
    }
Пример #4
0
 void Awake()
 {
     if (!SingletonMonoBehaviour <QualityManager> .DestroyExtraObjects(this))
     {
     }
 }