Esempio n. 1
0
    void Awake()
    {
        if (Instance != null)
        {
            Debug.LogError("QuadTreeSceneManager inited many times!");
            Destroy(this);
            return;
        }
        Instance = this;

        if (QualitySetting.IsVeryLowIPhone())
        {
            MAX_CACHE_NUM = 5;
            DIE_TIME      = 5;
        }
        else
        {
            MAX_CACHE_NUM = 10;
            DIE_TIME      = 10;
        }

        InvokeRepeating("ReleaseTooOld", DIE_TIME, DIE_TIME);
    }
Esempio n. 2
0
 void Awake()
 {
     _instance = this;
 }
 void OnEnable()
 {
     quadTreeMgr = GetComponent <QuadTreeSceneManager>();
     lastPositon = null;
 }