コード例 #1
0
 public HFTGame AddPlayerToGame(HFTPlayer player, string gameId, object data)
 {
     HFTGameGroup gameGroup = GetGameGroup(gameId);
     if (gameGroup == null)
     {
         return null;
     }
     return gameGroup.AddPlayer(player, data);
 }
コード例 #2
0
 public HFTGame AddPlayer(HFTPlayer player, object data)
 {
     if (masterGame_ != null)
     {
         return AddPlayerToGame(player, masterGame_.id, data);
     }
     log_.Error("no games to add player to");
     return null;
 }
コード例 #3
0
 /**
  * Adds a player to a specific game.
  * @param {Player} player to add
  * @param {string} id
  * @param {Object?} data add to send in connect msg
  */
 public HFTGame AddPlayerToGame(HFTPlayer player, string id, object data)
 {
     HFTGame game = GetGameById(id);
     if (game != null)
     {
         game.AddPlayer(player, data);
         return game;
     }
     log_.Error("no game with id '" + id + "'");
     return null;
 }