Exemplo n.º 1
0
        public void OpenLobbyButtonAdded(NodeAddedEvent e, OpenLobbyButtonNode button, [JoinAll] SelfUserNode selfUser, [JoinAll] CustomLobbyNode lobby)
        {
            button.openLobbyButton.ResetButtonText();
            button.openLobbyButton.Price = (int)lobby.openCustomLobbyPrice.OpenPrice;
            bool flag2 = lobby.Entity.HasComponent <OpenToConnectLobbyComponent>();

            if (lobby.Entity.HasComponent <SelfComponent>() && flag2)
            {
                button.openLobbyButton.LobbyId = lobby.Entity.Id;
                button.openLobbyButton.Price   = -1;
            }
        }
Exemplo n.º 2
0
 public void OpenLobby(ButtonClickEvent e, OpenLobbyButtonNode button, [JoinAll] CustomLobbyNode lobby, [JoinAll] SelfUserNode selfUser)
 {
     if (lobby.Entity.HasComponent <OpenToConnectLobbyComponent>())
     {
         GUIUtility.systemCopyBuffer  = button.openLobbyButton.LobbyId.ToString();
         button.openLobbyButton.Price = -1;
     }
     else
     {
         long exchangingCrystalls = lobby.openCustomLobbyPrice.OpenPrice - selfUser.userMoney.Money;
         if (exchangingCrystalls <= 0L)
         {
             base.ScheduleEvent <OpenCustomLobbyEvent>(selfUser);
         }
         else
         {
             MainScreenComponent.Instance.ShowHome();
             MainScreenComponent.Instance.ShowShopIfNotVisible();
             base.ScheduleEvent(new GoToExchangeCryScreen(exchangingCrystalls), selfUser);
         }
     }
 }
Exemplo n.º 3
0
 public void LobbyOpened(NodeAddedEvent e, SelfOpenLobbyNode lobby, [JoinAll, Combine] OpenLobbyButtonNode button)
 {
     button.openLobbyButton.LobbyId = lobby.Entity.Id;
     GUIUtility.systemCopyBuffer    = button.openLobbyButton.LobbyId.ToString();
     button.openLobbyButton.Price   = -1;
 }