1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 19:27:26 +08:00
osu-lazer/osu.Game/Modes/Scoring/Score.cs

72 lines
2.1 KiB
C#
Raw Normal View History

// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
2016-11-29 14:41:48 +08:00
2017-03-15 13:06:05 +08:00
using System;
using Newtonsoft.Json;
2017-03-04 18:02:36 +08:00
using osu.Game.Database;
2017-03-14 21:11:38 +08:00
using osu.Game.Modes.Mods;
using osu.Game.Users;
using System.IO;
namespace osu.Game.Modes.Scoring
2016-11-29 14:41:48 +08:00
{
public class Score
{
2017-03-15 13:06:05 +08:00
[JsonProperty(@"rank")]
2017-03-14 05:34:43 +08:00
public ScoreRank Rank { get; set; }
2017-03-15 13:06:05 +08:00
[JsonProperty(@"score")]
2016-11-29 22:59:56 +08:00
public double TotalScore { get; set; }
public double Accuracy { get; set; }
2017-01-10 16:01:53 +08:00
public double Health { get; set; }
2017-03-15 13:06:05 +08:00
[JsonProperty(@"maxcombo")]
2017-03-10 15:05:05 +08:00
public int MaxCombo { get; set; }
public int Combo { get; set; }
2017-03-14 05:34:43 +08:00
public Mod[] Mods { get; set; }
2017-03-14 05:34:43 +08:00
public User User { get; set; }
2017-03-15 13:06:05 +08:00
[JsonProperty(@"replay_data")]
public Replay Replay;
2017-03-15 13:06:05 +08:00
2017-03-04 18:02:36 +08:00
public BeatmapInfo Beatmap;
2017-03-15 13:06:05 +08:00
[JsonProperty(@"score_id")]
public long OnlineScoreID;
[JsonProperty(@"username")]
public string Username;
[JsonProperty(@"user_id")]
public long UserID;
[JsonProperty(@"date")]
public DateTime Date;
/// <summary>
/// Creates a legacy replay which is read from a stream.
/// </summary>
/// <param name="reader">The stream reader.</param>
/// <returns>The replay.</returns>
public virtual Replay CreateLegacyReplayFrom(StreamReader reader) => new LegacyReplay(reader);
2017-03-15 13:06:05 +08:00
// [JsonProperty(@"count50")] 0,
//[JsonProperty(@"count100")] 0,
//[JsonProperty(@"count300")] 100,
//[JsonProperty(@"countmiss")] 0,
//[JsonProperty(@"countkatu")] 0,
//[JsonProperty(@"countgeki")] 31,
//[JsonProperty(@"perfect")] true,
//[JsonProperty(@"enabled_mods")] [
// "DT",
// "FL",
// "HD",
// "HR"
//],
//[JsonProperty(@"rank")] "XH",
//[JsonProperty(@"pp")] 26.1816,
//[JsonProperty(@"replay")] true
2016-11-29 14:41:48 +08:00
}
}