コード例 #1
0
ファイル: LoginPanel.cs プロジェクト: mengtest/U3DEventFrame
 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;
     }
 }
コード例 #2
0
ファイル: LoadManager.cs プロジェクト: hellokiddy/Keedy
        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);
        }
コード例 #3
0
 public Loader()
 {
     // 可選擇任一一個new 如果有獨立Facade class 也可以
     loader = new CachingLoader <T>();
 }