Beispiel #1
0
 private static void CleanupBreachShrines()
 {
     foreach (var cshrine in GameObject.FindObjectsOfType <CustomShrineController>())
     {
         if (!FakePrefab.IsFakePrefab(cshrine))
         {
             GameObject.Destroy(cshrine.gameObject);
         }
         else
         {
             cshrine.gameObject.SetActive(false);
         }
     }
 }
 // Token: 0x0600005C RID: 92 RVA: 0x000053C0 File Offset: 0x000035C0
 private static void CleanupBreachShrines()
 {
     foreach (ShrineFactory.CustomShrineController customShrineController in UnityEngine.Object.FindObjectsOfType <ShrineFactory.CustomShrineController>())
     {
         bool flag = !FakePrefab.IsFakePrefab(customShrineController);
         if (flag)
         {
             UnityEngine.Object.Destroy(customShrineController.gameObject);
         }
         else
         {
             customShrineController.gameObject.SetActive(false);
         }
     }
 }
 public static void Init()
 {
     if (m_initialized)
     {
         return;
     }
     DungeonHooks.OnFoyerAwake           += PlaceBreachShrines;
     DungeonHooks.OnPreDungeonGeneration += (generator, dungeon, flow, dungeonSeed) =>
     {
         if (flow.name != "Foyer Flow" && !GameManager.IsReturningToFoyerWithPlayer)
         {
             foreach (var cshrine in GameObject.FindObjectsOfType <CustomShrineController>())
             {
                 if (!FakePrefab.IsFakePrefab(cshrine))
                 {
                     GameObject.Destroy(cshrine.gameObject);
                 }
             }
             m_builtShrines = false;
         }
     };
     m_initialized = true;
 }