Example #1
0
        private int InternalLoadAsync(Action <bool, AssetBundle> loadedAction)
        {
            if (loadedAction == null)
            {
                loadedAction = s_DefaultLoadedCallback;
            }

            var index = ResourceManager.GetNewResourceIndex();

            m_ResouceIndexSet.Add(index);
            if (m_LoadState == LoadState.Init)
            {
                m_LoadedCallbackDict.Add(index, loadedAction);
                m_LoadState = LoadState.WaitLoad;
                GameCenter.s_StartCoroutineFunc(LoadFuncEnumerator());
            }
            else if (m_LoadState == LoadState.WaitLoad || m_LoadState == LoadState.Loading)
            {
                m_LoadedCallbackDict.Add(index, loadedAction);
            }
            else
            {
                loadedAction(m_Bundle != null, m_Bundle);
            }

            return(index);
        }
Example #2
0
        private void Awake()
        {
            if (Instance == null)
            {
                Instance = this;
                DontDestroyOnLoad(this);
            }
            else
            {
                Debug.LogError("GameRoot 初始化两次");
                return;
            }

            GameCenter.s_StartCoroutineFunc = StartCoroutine;
            GameCenter.Awake();
        }
Example #3
0
 public void StartUpdate(Action endAction, Action <long, long> progressAction)
 {
     GameCenter.s_StartCoroutineFunc(StartUpdateEnumerator(endAction, progressAction));
 }
Example #4
0
 private void OnApplicationQuit()
 {
     GameCenter.OnApplicationQuit();
 }
Example #5
0
 private void OnDestroy()
 {
     GameCenter.OnDestroy();
 }
Example #6
0
 private void OnApplicationPause(bool pauseStatus)
 {
     GameCenter.OnApplicationPause(pauseStatus);
 }
Example #7
0
 private void OnApplicationFocus(bool hasFocus)
 {
     GameCenter.OnApplicationFocus(hasFocus);
 }
Example #8
0
 private void FixedUpdate()
 {
     GameCenter.FixedUpdate();
 }
Example #9
0
 private void Update()
 {
     GameCenter.Update();
 }
Example #10
0
 private void Start()
 {
     GameCenter.Start();
 }