コード例 #1
0
 public void updateState(CommonDefine.PLAYER_STATE state)
 {
     // 这里只处理用户上线(游戏中)和离线
     if (state == CommonDefine.PLAYER_STATE.STATE_TYPE_OFFLINE)
     {
         _head.interactable = false;
     }
     else if (state == CommonDefine.PLAYER_STATE.STATE_TYPE_PLAYING)
     {
         _head.interactable = true;
     }
 }
コード例 #2
0
ファイル: Room.cs プロジェクト: shacleff/LianQiClient
 public static bool updatePlayerStateBySeat(int seat, CommonDefine.PLAYER_STATE state)
 {
     for (int i = 0; i < playerList.Count; i++)
     {
         if (playerList[i].seat == seat)
         {
             Player p = playerList[i];
             p.state       = state;
             playerList[i] = p;
             return(true);
         }
     }
     return(false);
 }
コード例 #3
0
ファイル: Room.cs プロジェクト: shacleff/LianQiClient
 public static bool updatePlayerStateByUserID(int userID, CommonDefine.PLAYER_STATE state)
 {
     for (int i = 0; i < playerList.Count; i++)
     {
         if (playerList[i].userID == userID)
         {
             Player p = playerList[i];
             p.state       = state;
             playerList[i] = p;
             return(true);
         }
     }
     return(false);
 }