public override void ProcessEvent(MsgBase tmpMsg) { //base.ProcessEvent (tmpMsg); if (tmpMsg.msgId == (ushort)LoginEvent.Idle) { Debug.Log("Idle"); loadState = ILoadState.Idle; } else if (tmpMsg.msgId == (ushort)LoginEvent.Load) { Debug.Log("Load"); loadState = ILoadState.Load; } }
public ILoadState CreateLoadTask(string[] assetPaths, OnLoadTaskComplete onTaskComplete, int priority, ELoaderType loaderType) { ILoadTask task = GetTask(); task.AddTaskCallBack(onTaskComplete); int loaderCount = assetPaths == null ? 0 : assetPaths.Length; //set loader count first, then the task could check if completed... task.SetLoaderCount(loaderCount); if (assetPaths != null) { for (int i = 0; i < assetPaths.Length; i++) { ILoader loader = GetLoader(assetPaths[i], priority, loaderType); loader.AddTask(task); } } ILoadState state = GetState(); state.SetTask(task); return(state); }
public Loader() { // 可選擇任一一個new 如果有獨立Facade class 也可以 loader = new CachingLoader <T>(); }