Ejemplo n.º 1
0
 private void LoadAssetUpdateCallback(string configAssetName, float progress, object userData)
 {
     if (m_LoadConfigUpdateEventHandler != null)
     {
         LoadConfigUpdateEventArgs loadConfigUpdateEventArgs = LoadConfigUpdateEventArgs.Create(configAssetName, progress, userData);
         m_LoadConfigUpdateEventHandler(this, loadConfigUpdateEventArgs);
         ReferencePool.Release(loadConfigUpdateEventArgs);
     }
 }
Ejemplo n.º 2
0
        private void LoadConfigUpdateCallback(string configAssetName, float progress, object userData)
        {
            LoadConfigInfo loadConfigInfo = (LoadConfigInfo)userData;

            if (loadConfigInfo == null)
            {
                throw new GameFrameworkException("Load config info is invalid.");
            }

            if (m_LoadConfigUpdateEventHandler != null)
            {
                LoadConfigUpdateEventArgs loadConfigUpdateEventArgs = LoadConfigUpdateEventArgs.Create(configAssetName, loadConfigInfo.LoadType, progress, loadConfigInfo.UserData);
                m_LoadConfigUpdateEventHandler(this, loadConfigUpdateEventArgs);
                ReferencePool.Release(loadConfigUpdateEventArgs);
            }
        }