// Token: 0x06002CD7 RID: 11479 RVA: 0x00024BEE File Offset: 0x00022DEE
 public RuntimeWorldMapIcon(GameWorldArea.WorldMapIcon icon, RuntimeGameWorldArea area)
 {
     this.Icon     = icon.Icon;
     this.Guid     = icon.Guid;
     this.Position = icon.Position;
     this.Area     = area;
     this.IsSecret = icon.IsSecret;
 }
 // Token: 0x06002BC7 RID: 11207
 public void ShowAreaIcons()
 {
     for (int i = 0; i < GameWorld.Instance.RuntimeAreas.Count; i++)
     {
         RuntimeGameWorldArea runtimeGameWorldArea = GameWorld.Instance.RuntimeAreas[i];
         foreach (MoonGuid guid in RandomizerPlantManager.Plants.Keys)
         {
             RandomizerPlantManager.PlantData plant = RandomizerPlantManager.Plants[guid];
             if (runtimeGameWorldArea.Area.InsideFace(plant.Position))
             {
                 RuntimeWorldMapIcon runtimeWorldMapIcon = null;
                 for (int j = 0; j < runtimeGameWorldArea.Icons.Count; j++)
                 {
                     if (runtimeGameWorldArea.Icons[j].Guid == guid)
                     {
                         runtimeWorldMapIcon = runtimeGameWorldArea.Icons[j];
                         break;
                     }
                 }
                 if (runtimeWorldMapIcon == null && RandomizerPlantManager.Display(guid))
                 {
                     GameWorldArea.WorldMapIcon icon = new GameWorldArea.WorldMapIcon
                     {
                         Guid     = guid,
                         Icon     = WorldMapIconType.Experience,
                         IsSecret = false,
                         Position = plant.Position
                     };
                     runtimeGameWorldArea.Icons.Add(new RuntimeWorldMapIcon(icon, runtimeGameWorldArea));
                 }
                 else if (runtimeWorldMapIcon != null)
                 {
                     runtimeWorldMapIcon.Icon = (RandomizerPlantManager.Display(guid) ? WorldMapIconType.Experience : WorldMapIconType.Invisible);
                 }
             }
         }
         for (int k = 0; k < runtimeGameWorldArea.Icons.Count; k++)
         {
             runtimeGameWorldArea.Icons[k].Hide();
         }
         if (!runtimeGameWorldArea.Area.VisitableCondition || runtimeGameWorldArea.Area.VisitableCondition.Validate(null))
         {
             for (int l = 0; l < runtimeGameWorldArea.Icons.Count; l++)
             {
                 RuntimeWorldMapIcon runtimeWorldMapIcon2 = runtimeGameWorldArea.Icons[l];
                 if (!GameMapUI.Instance.ShowingTeleporters || runtimeWorldMapIcon2.Icon != WorldMapIconType.SavePedestal)
                 {
                     runtimeWorldMapIcon2.Show();
                 }
             }
         }
     }
 }
Exemplo n.º 3
0
 public RuntimeGameWorldArea FindAreaFromPosition(Vector3 cameraPosition)
 {
     for (int i = 0; i < GameWorld.Instance.RuntimeAreas.Count; i++)
     {
         RuntimeGameWorldArea runtimeGameWorldArea = GameWorld.Instance.RuntimeAreas[i];
         Vector3 position            = runtimeGameWorldArea.Area.BoundaryCage.transform.InverseTransformPoint(cameraPosition);
         CageStructureTool.Face face = runtimeGameWorldArea.Area.BoundaryCage.FindFaceAtPositionFaster(position);
         if (face != null)
         {
             return(runtimeGameWorldArea);
         }
     }
     return(null);
 }