Example #1
0
 private void GotoSubState(SubState state, SlidingSide fromSide, bool tween = true)
 {
     InactivityHandler.UpdateActivity();
     if (state == SubState.GodSelection)
     {
         GodSelectionState godSelectionState = new GodSelectionState();
         godSelectionState.onGodSelected = (Action <God>)Delegate.Combine(godSelectionState.onGodSelected, new Action <God>(OnGodSelected));
         m_ui.SetStateIndex(0, tween);
         BaseFightSelectionState baseFightSelectionState = godSelectionState;
         m_ui.returnButton.set_interactable(false);
         baseFightSelectionState.fromSide            = fromSide;
         baseFightSelectionState.onUIOpeningFinished = OnChildUIOpeningFinished;
         this.SetChildState(baseFightSelectionState, 0);
         return;
     }
     throw new ArgumentOutOfRangeException("state", state, null);
 }
 public void OnGroupModified(long playerId, IList <FightPlayerInfo> players)
 {
     for (int num = m_allies.Count - 1; num >= 0; num--)
     {
         FightPlayerInfo fightPlayerInfo = m_allies[num];
         if (!PlayerListContain(players, fightPlayerInfo.Uid))
         {
             RemoveAlly(fightPlayerInfo);
             m_allies.Remove(fightPlayerInfo);
         }
     }
     for (int i = 0; i < players.Count; i++)
     {
         FightPlayerInfo fightPlayerInfo2 = players[i];
         if (playerId != fightPlayerInfo2.Uid && !PlayerListContain(m_allies, fightPlayerInfo2.Uid))
         {
             AddAlly(fightPlayerInfo2);
             m_allies.Add(fightPlayerInfo2);
         }
     }
     m_playerInvitationPanel.RemoveAllReceivedInvitations();
     m_playerInvitationPanel.SetInvitationsLocked(m_allies.Count + 1 >= m_playerPanels.Length);
     InactivityHandler.UpdateActivity();
 }
 protected void UpdateInactivityTime()
 {
     InactivityHandler.UpdateActivity();
 }