Esempio n. 1
0
 public void MatchLobbyGUIRemoved(NodeRemoveEvent e, LobbyUINode ui, [Combine, JoinByBattleLobby, Context] UserNode userNode)
 {
     if (userNode.Entity.HasComponent <LobbyUserListItemComponent>())
     {
         userNode.Entity.RemoveComponent <LobbyUserListItemComponent>();
     }
     ui.matchLobbyGUI.RemoveUser(userNode.Entity);
 }
 public void GroupChat(NodeAddedEvent e, LobbyUINode lobbyUI, LobbyChatNode chat)
 {
     lobbyUI.matchLobbyGUI.ShowChat(true);
     if (chat.Entity.HasComponent <ScreenGroupComponent>())
     {
         chat.Entity.RemoveComponent <ScreenGroupComponent>();
     }
     lobbyUI.screenGroup.Attach(chat.Entity);
 }
        public void ShowCustomLobbyElements(NodeAddedEvent e, LobbyUINode lobbyUI, CustomLobbyNode lobby)
        {
            lobbyUI.matchLobbyGUI.ShowCustomLobbyElements(true);
            lobbyUI.matchLobbyGUI.ShowEditParamsButton(lobby.Entity.HasComponent <SelfComponent>(), !lobby.Entity.HasComponent <BattleGroupComponent>());
            ClientBattleParams          @params            = lobby.clientBattleParams.Params;
            CreateBattleScreenComponent createBattleScreen = lobbyUI.matchLobbyGUI.createBattleScreen;

            lobbyUI.matchLobbyGUI.paramTimeLimit.text    = @params.TimeLimit + " " + createBattleScreen.minutesText;
            lobbyUI.matchLobbyGUI.paramFriendlyFire.text = [email protected] ? ((string)createBattleScreen.offText) : ((string)createBattleScreen.onText);
            lobbyUI.matchLobbyGUI.enabledModules.text    = @params.DisabledModules ? ((string)createBattleScreen.offText) : ((string)createBattleScreen.onText);
        }
 public void UpdateOnRemoveUI(NodeRemoveEvent e, LobbyUINode lobbyUI, [JoinAll] ButtonNode button)
 {
     this.DelayUpdate(button);
 }
 public void UpdateOnAddUI(NodeAddedEvent e, LobbyUINode lobbyUI, [JoinAll] ButtonNode button)
 {
     this.DelayUpdate(button);
 }
 public void LeaveBattleLobby(NodeRemoveEvent e, BattleLobbyNode lobby, [JoinAll] LobbyUINode lobbyUI)
 {
     MainScreenComponent.Instance.ShowHome();
 }
 public void HideElements(NodeRemoveEvent e, LobbyUINode lobbyUI)
 {
     lobbyUI.matchLobbyGUI.ShowCustomLobbyElements(false);
     lobbyUI.matchLobbyGUI.ShowEditParamsButton(false, true);
     lobbyUI.matchLobbyGUI.ShowChat(false);
 }
 public void EnableEditButtonOnBattleFinish(NodeRemoveEvent e, SingleNode <BattleGroupComponent> bg, [JoinSelf] CustomLobbyNode lobby, [JoinAll] LobbyUINode lobbyUI)
 {
     lobbyUI.matchLobbyGUI.ShowEditParamsButton(lobby.Entity.HasComponent <SelfComponent>(), true);
 }
Esempio n. 9
0
 public void SetSelfUserTeamColor(NodeAddedEvent e, SelfBattleLobbyUser selfUserNode, [JoinByBattleLobby] LobbyNode lobby, [JoinAll, Context] LobbyUINode ui)
 {
     ui.matchLobbyGUI.UserTeamColor = !lobby.Entity.HasComponent <CustomBattleLobbyComponent>() ? TeamColor.NONE : selfUserNode.teamColor.TeamColor;
 }
Esempio n. 10
0
        public void MatchLobbyGUIAdded(NodeAddedEvent e, LobbyUINode matchLobbyGUI, [Combine, JoinByBattleLobby, Context] UserNode userNode, [JoinByBattleLobby] Optional <CustomLobbyNode> customLobby, [JoinAll] SelfBattleLobbyUser selfBattleLobbyUser)
        {
            bool selfUser = userNode.userGroup.Key == selfBattleLobbyUser.userGroup.Key;

            matchLobbyGUI.matchLobbyGUI.AddUser(userNode.Entity, selfUser, ((userNode.Entity.HasComponent <SquadGroupComponent>() && selfBattleLobbyUser.Entity.HasComponent <SquadGroupComponent>()) && (userNode.Entity.GetComponent <SquadGroupComponent>().Key == selfBattleLobbyUser.Entity.GetComponent <SquadGroupComponent>().Key)) || customLobby.IsPresent());
        }