public static void ResetData()
 {
     user               = null;
     PlayerList         = new List <Player>();
     sessionCode        = "";
     field              = null;
     log                = new ChangeLog();
     startLobby         = false;
     startGame          = false;
     lobbyStarted       = false;
     records            = new HighscoreRecords();
     sevicebusQueueLogs = new List <string>();
     sevicebusLogs      = new List <string>();
     lastSendMessage    = "";
 }
示例#2
0
        public void StoreNewHighscoreRecord(HighscoreRecords records)
        {
            SessionController sessionController = new SessionController();

            Session session = sessionController.FindByCode(StaticResources.sessionCode);

            Highscore highscore = new Highscore()
            {
                PlayerId   = StaticResources.user.PlayerId,
                session_id = session.id,
                shots      = records.shots,
                hits       = records.hits,
                hit_streak = records.highestHitStreak
            };

            _repository.highscore.CreateHighscore(highscore);
            _repository.Save();
        }