예제 #1
0
 private void handlePresenceData(PresenceData presenceData)
 {
     if (!string.IsNullOrEmpty(presenceData.World))
     {
         SettingsPanelServerListButton buttonForWorld = getButtonForWorld(presenceData.World);
         if (buttonForWorld != null)
         {
             buttonForWorld.ShowFriendIndicator();
         }
         else
         {
             worldsWithFriends.Add(presenceData.World);
         }
     }
 }
예제 #2
0
 private void loadWorldButton(WorldDefinition definition, Language selectedLanguage)
 {
     if (!worldButtons.ContainsKey(definition.WorldName))
     {
         GameObject gameObject = Object.Instantiate(buttonPrefab, ButtonParent, worldPositionStays: false);
         gameObject.SetActive(definition.Language == selectedLanguage);
         SettingsPanelServerListButton component = gameObject.GetComponent <SettingsPanelServerListButton>();
         bool currentServer = currentWorldDefinition.Equals(definition);
         component.LoadWorld(definition, currentServer);
         if (worldsWithFriends.Contains(definition.WorldName))
         {
             component.ShowFriendIndicator();
         }
         worldButtons.Add(definition.WorldName, component);
     }
 }
예제 #3
0
 private bool onWorldsFound(WorldServiceEvents.WorldsWithRoomPopulationReceivedEvent evt)
 {
     if (evt.WorldRoomPopulations.Count > 0)
     {
         foreach (WorldRoomPopulation worldRoomPopulation in evt.WorldRoomPopulations)
         {
             RoomPopulationScale           populationScaled = worldRoomPopulation.populationScaled;
             SettingsPanelServerListButton buttonForWorld   = getButtonForWorld(worldRoomPopulation.worldName);
             if (buttonForWorld != null)
             {
                 buttonForWorld.UpdatePopulationScale(populationScaled);
             }
             if (currentWorldDefinition.WorldName == worldRoomPopulation.worldName)
             {
                 CurrentServer.UpdatePopulationScale(populationScaled);
             }
         }
     }
     return(false);
 }