Beispiel #1
0
        public static void AddMarker()
        {
            SceneBattle instance = SceneBattle.Instance;

            if (!UnityEngine.Object.op_Implicit((UnityEngine.Object)instance) || !UnityEngine.Object.op_Implicit((UnityEngine.Object)instance.CurrentScene) || instance.Battle == null)
            {
                return;
            }
            using (List <TrickData> .Enumerator enumerator1 = TrickData.mTrickDataLists.GetEnumerator())
            {
                while (enumerator1.MoveNext())
                {
                    TrickData current1 = enumerator1.Current;
                    if ((bool)current1.mValid && !TrickData.mTrickMarkerLists.ContainsKey(current1))
                    {
                        Dictionary <TrickData, GameObject> dictionary = new Dictionary <TrickData, GameObject>();
                        using (Dictionary <TrickData, GameObject> .Enumerator enumerator2 = TrickData.mTrickMarkerLists.GetEnumerator())
                        {
                            while (enumerator2.MoveNext())
                            {
                                KeyValuePair <TrickData, GameObject> current2 = enumerator2.Current;
                                TrickData key = current2.Key;
                                if ((int)key.mGridX == (int)current1.mGridX && (int)key.mGridY == (int)current1.mGridY)
                                {
                                    GameObject gameObject = current2.Value;
                                    if (UnityEngine.Object.op_Implicit((UnityEngine.Object)gameObject))
                                    {
                                        UnityEngine.Object.Destroy((UnityEngine.Object)gameObject.get_gameObject());
                                    }
                                }
                                else
                                {
                                    dictionary.Add(key, current2.Value);
                                }
                            }
                        }
                        if (TrickData.mTrickMarkerLists.Count != dictionary.Count)
                        {
                            TrickData.mTrickMarkerLists = dictionary;
                        }
                        TrickData.entryMarker(instance, current1);
                    }
                }
            }
        }
Beispiel #2
0
 public static void AddMarker(Transform parent, Dictionary <string, GameObject> trickObj, GameObject baseObj)
 {
     using (List <TrickData> .Enumerator enumerator1 = TrickData.mTrickDataLists.GetEnumerator())
     {
         while (enumerator1.MoveNext())
         {
             TrickData current1 = enumerator1.Current;
             if ((bool)current1.mValid && !TrickData.mTrickMarkerLists.ContainsKey(current1))
             {
                 Dictionary <TrickData, GameObject> dictionary = new Dictionary <TrickData, GameObject>();
                 using (Dictionary <TrickData, GameObject> .Enumerator enumerator2 = TrickData.mTrickMarkerLists.GetEnumerator())
                 {
                     while (enumerator2.MoveNext())
                     {
                         KeyValuePair <TrickData, GameObject> current2 = enumerator2.Current;
                         TrickData key = current2.Key;
                         if ((int)key.mGridX == (int)current1.mGridX && (int)key.mGridY == (int)current1.mGridY)
                         {
                             GameObject gameObject = current2.Value;
                             if (UnityEngine.Object.op_Implicit((UnityEngine.Object)gameObject))
                             {
                                 UnityEngine.Object.Destroy((UnityEngine.Object)gameObject.get_gameObject());
                             }
                         }
                         else
                         {
                             dictionary.Add(key, current2.Value);
                         }
                     }
                 }
                 if (TrickData.mTrickMarkerLists.Count != dictionary.Count)
                 {
                     TrickData.mTrickMarkerLists = dictionary;
                 }
                 TrickData.entryMarker(parent, current1, trickObj, baseObj);
             }
         }
     }
 }