コード例 #1
0
ファイル: Context.cs プロジェクト: isoundy000/wzry-1
 public static void Cleanup(int contextId)
 {
     if (ms_contexts != null)
     {
         if (contextId == -1)
         {
             ms_contexts.Clear();
         }
         else if (ms_contexts.ContainsKey(contextId))
         {
             ms_contexts.Remove(contextId);
         }
     }
 }
コード例 #2
0
 protected virtual void OnDestroy()
 {
     GlobalTrailRendererCount--;
     if (GlobalTrailRendererCount == 0)
     {
         if ((_toClean != null) && (_toClean.Count > 0))
         {
             for (int i = 0; i < _toClean.Count; i++)
             {
                 Mesh mesh = _toClean[i];
                 if (mesh != null)
                 {
                     if (Application.isEditor)
                     {
                         UnityEngine.Object.DestroyImmediate(mesh, true);
                     }
                     else
                     {
                         UnityEngine.Object.Destroy(mesh);
                     }
                 }
             }
         }
         _toClean = null;
         _matToTrailList.Clear();
         _matToTrailList = null;
     }
     if (this._activeTrail != null)
     {
         this._activeTrail.Dispose();
         this._activeTrail = null;
     }
     if (this._fadingTrails != null)
     {
         for (int j = 0; j < this._fadingTrails.Count; j++)
         {
             PCTrail trail = this._fadingTrails[j];
             if (trail != null)
             {
                 trail.Dispose();
             }
         }
         this._fadingTrails.Clear();
     }
 }
コード例 #3
0
ファイル: CSkinInfo.cs プロジェクト: wujiangu/wanshiwu0.1
 public static void InitHeroSkinDicData()
 {
     s_heroSkinDic.Clear();
     Dictionary <long, object> .Enumerator enumerator = GameDataMgr.heroSkinDatabin.GetEnumerator();
     while (enumerator.MoveNext())
     {
         KeyValuePair <long, object> current = enumerator.Current;
         ResHeroSkin item = current.Value as ResHeroSkin;
         if (((item != null) && (item.bIsShow != 0)) && (GameDataMgr.heroDatabin.GetDataByKey(item.dwHeroID) != null))
         {
             if (!s_heroSkinDic.ContainsKey(item.dwHeroID))
             {
                 ListView <ResHeroSkin> view = new ListView <ResHeroSkin>();
                 s_heroSkinDic.Add(item.dwHeroID, view);
             }
             s_heroSkinDic[item.dwHeroID].Add(item);
         }
     }
 }
コード例 #4
0
ファイル: Property.cs プロジェクト: isoundy000/wzry-1
 public static void Cleanup()
 {
     ms_properties.Clear();
 }