示例#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);
        }
示例#2
0
        private void Awake()
        {
            if (Instance == null)
            {
                Instance = this;
                DontDestroyOnLoad(this);
            }
            else
            {
                Debug.LogError("GameRoot 初始化两次");
                return;
            }

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