Example #1
0
    //private static List<string> _currentAssetPriList = new List<string> ();
    //private static string _currentAssetPriFileName = "";
    //private static int _currentAssetPriLevel;

    /*
     * public static void DownLoadPriCallBack (float progress, System.Object userData)
     * {
     *      if (progress < 1.0f)
     *              return;
     *
     *      Debug.Log("DOWNLOAD CALLBACK");
     *      _currentAssetPriList.Remove (_currentAssetPriFileName);
     *      _currentAssetPriFileName = "";
     *      if (_currentAssetPriList.Count == 0) {
     *              Debug.Log("ONE COLLECTION DOWNLOAD OVER");
     *              _assetPriList.RemoveFirst ();
     *
     *              //PlayerLevelXX == 1  this collection download over
     *              PlayerPrefs.SetInt ("PlayerLevel" + _currentAssetPriLevel, 1);
     *      }
     * }*/

    /// <summary>
    /// Update this instance.
    /// Manager needs to be called during every frame to be drive downloading tasks.
    /// </summary>
    public static void Update()
    {
        WwwLoaderManager.Update();

        if (_initialzed != EInializedState.Initialized)
        {
            return;
        }



        /*
         * if (_assetPriList.Count != 0 && _currentAssetPriList.Count == 0) {
         *      Debug.Log("BEGIN DOWN COLLECTION");
         *      Debug.Log("_assetPriList.Count:"+_assetPriList.Count);
         *      Dictionary<int, List<string>> tmpDict = _assetPriList.First.Value;
         *      foreach (KeyValuePair<int, List<string>> tmpK in tmpDict) {
         *              _currentAssetPriLevel = tmpK.Key;
         *              if(PlayerPrefs.GetInt("PlayerLevel"+_currentAssetPriLevel) == 1 ){
         *                      Debug.Log("THE COLLECTION DOWNLOAD ALREADY OVER");
         *                      _assetPriList.RemoveFirst();
         *                      break;
         *              }
         *              List<string> ss = tmpK.Value;
         *              if(ss.Count!=0)
         *              {
         *                      _currentAssetPriList = tmpK.Value;
         *              }else{
         *                      _assetPriList.RemoveFirst();
         *                      break;
         *              }
         *
         *      }
         * }
         *
         * if(_currentAssetPriList.Count != 0 && _currentAssetPriFileName.Equals(""))
         * {
         *      Debug.Log("BEGIN DOWN COLLECTION FILE");
         *      _currentAssetPriFileName = _currentAssetPriList.ToArray()[0];
         *      Download (DownLoadPriCallBack, new string []{_currentAssetPriFileName});
         * }
         */
    }
Example #2
0
 // Update is called once per frame
 void Update()
 {
     WwwLoaderManager.Update();
 }