Exemplo n.º 1
0
 private void LoadAssetDependencyAssetCallback(string configAssetName, string dependencyAssetName, int loadedCount, int totalCount, object userData)
 {
     if (m_LoadConfigDependencyAssetEventHandler != null)
     {
         LoadConfigDependencyAssetEventArgs loadConfigDependencyAssetEventArgs = LoadConfigDependencyAssetEventArgs.Create(configAssetName, dependencyAssetName, loadedCount, totalCount, userData);
         m_LoadConfigDependencyAssetEventHandler(this, loadConfigDependencyAssetEventArgs);
         ReferencePool.Release(loadConfigDependencyAssetEventArgs);
     }
 }
Exemplo n.º 2
0
        private void LoadConfigDependencyAssetCallback(string configAssetName, string dependencyAssetName, int loadedCount, int totalCount, object userData)
        {
            LoadConfigInfo loadConfigInfo = (LoadConfigInfo)userData;

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

            if (m_LoadConfigDependencyAssetEventHandler != null)
            {
                LoadConfigDependencyAssetEventArgs loadConfigDependencyAssetEventArgs = LoadConfigDependencyAssetEventArgs.Create(configAssetName, dependencyAssetName, loadedCount, totalCount, loadConfigInfo.UserData);
                m_LoadConfigDependencyAssetEventHandler(this, loadConfigDependencyAssetEventArgs);
                ReferencePool.Release(loadConfigDependencyAssetEventArgs);
            }
        }