Example #1
0
 public RoomUser(MatchUser user)
 {
     if (user == null)
     {
         return;
     }
     UserId        = user.UserId;
     RobotUserId   = user.RobotUserId;
     RobotScore    = user.Score;
     ConnectTime   = 0;
     Token         = IsRobot ? string.Empty : RandomExtensions.Instance.RandomString(8);
     ReportResult  = null;
     ReportTime    = 0;
     IsSnapshoting = false;
     CoopReport    = null;
 }
Example #2
0
 public TBattlePlayer(MatchUser user)
 {
     if (user == null)
     {
         return;
     }
     PlayerId      = user.UserId;
     PlayerName    = user.UserName;
     PlayerLevel   = user.CurLevel;
     ServerId      = user.ServerId;
     PlayerSeed    = BattleService.GenerateSeed();
     TowerPool     = user.TowerPool;
     Hero          = user.Hero;
     CriticalScale = user.CriticalScale;
     PlayerFrame   = new TBattlePlayerFrame()
     {
         FrameList = new List <TBattleFrame>()
     };
     PlayerAI = user.PlayerAI;
     FieldId  = user.FieldId;
 }