-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDataTemplates.cs
More file actions
58 lines (46 loc) · 1.28 KB
/
Copy pathDataTemplates.cs
File metadata and controls
58 lines (46 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
using System.Collections.Generic;
namespace LevelUp.PlayerData;
public class DataTemplates
{
/// <summary>
/// 玩家ID
/// </summary>
public string UserId { get; set; }
/// <summary>
/// 玩家等级
/// </summary>
public int Level { get; set; } = 1;
/// <summary>
/// 玩家经验
/// </summary>
public int Experience { get; set; } = 0;
// ========== Phase 4: 统计数据 ==========
/// <summary>
/// 总击杀数
/// </summary>
public int TotalKills { get; set; } = 0;
/// <summary>
/// 总死亡数
/// </summary>
public int TotalDeaths { get; set; } = 0;
/// <summary>
/// 总游戏局数
/// </summary>
public int TotalGamesPlayed { get; set; } = 0;
/// <summary>
/// 总游戏时长(秒)
/// </summary>
public int TotalPlayTime { get; set; } = 0;
/// <summary>
/// 最高连杀记录
/// </summary>
public int HighestKillStreak { get; set; } = 0;
/// <summary>
/// 各角色击杀统计
/// </summary>
public Dictionary<string, int> KillsByRole { get; set; } = new();
/// <summary>
/// K/D比率(计算属性)
/// </summary>
public float KDRatio => TotalDeaths > 0 ? (float)TotalKills / TotalDeaths : TotalKills;
}