Ejemplo n.º 1
0
    /// <summary>
    /// 设置当前游戏
    /// </summary>
    /// <param name="gameId"></param>
    private void SetCurrentGame(UIItemCreateRoomViewGame game)
    {
        if (m_CurrentGame != null && m_CurrentGame == game)
        {
            return;
        }
        m_CurrentGame = game;
        for (int i = 0; i < m_ArrGames.Length; ++i)
        {
            if (m_ArrGames[i] != m_CurrentGame)
            {
                m_ArrGames[i].isOn = false;
                m_ArrGames[i].HideRule();
            }
        }
        m_CurrentGame.isOn = true;
        m_CurrentGame.ShowRule();

        PlayerPrefs.SetString(LAST_TYPE_GAME + game.GameType, game.SettingId.ToString());
        PlayerPrefs.SetString(LAST_GAME_TYPE, game.GameType);
    }
Ejemplo n.º 2
0
 /// <summary>
 /// 游戏变更
 /// </summary>
 /// <param name="arg0"></param>
 private void OnGameChanged(UIItemCreateRoomViewGame game)
 {
     SetCurrentGame(game);
 }