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); }
private void Awake() { if (Instance == null) { Instance = this; DontDestroyOnLoad(this); } else { Debug.LogError("GameRoot 初始化两次"); return; } GameCenter.s_StartCoroutineFunc = StartCoroutine; GameCenter.Awake(); }
public void StartUpdate(Action endAction, Action <long, long> progressAction) { GameCenter.s_StartCoroutineFunc(StartUpdateEnumerator(endAction, progressAction)); }
private void OnApplicationQuit() { GameCenter.OnApplicationQuit(); }
private void OnDestroy() { GameCenter.OnDestroy(); }
private void OnApplicationPause(bool pauseStatus) { GameCenter.OnApplicationPause(pauseStatus); }
private void OnApplicationFocus(bool hasFocus) { GameCenter.OnApplicationFocus(hasFocus); }
private void FixedUpdate() { GameCenter.FixedUpdate(); }
private void Update() { GameCenter.Update(); }
private void Start() { GameCenter.Start(); }