コード例 #1
0
 /// <summary>
 /// Creates an empty data entry for a new character
 /// </summary>
 public CharacterStats(string guid)
 {
     this.guid = guid;
     played    = false;
     rounds    = new RoundData[Config.Rounds];
     for (int i = 0; i < Config.Rounds; i++)
     {
         rounds[i] = new RoundData();
     }
 }
コード例 #2
0
 /// <summary> Deserializes from JSON </summary>
 public CharacterStats(JSONObject json)
 {
     guid   = json["guid"].str;
     played = json["played"].b;
     rounds = new RoundData[Config.Rounds];
     for (int i = 0; i < Config.Rounds; i++)
     {
         rounds[i] = new RoundData(json["rounds"][i]);
     }
 }