GameState Structs and Parser

This commit is contained in:
2024-01-15 20:04:37 +01:00
parent aa4dcc05f5
commit ecd5be84d3
8 changed files with 136 additions and 0 deletions

View File

@ -0,0 +1,8 @@
namespace CS2GSI.GameState;
public struct CS2GameState
{
public int Timestamp;
public Map? Map;
public Player? Player;
}

8
GameState/Map.cs Normal file
View File

@ -0,0 +1,8 @@
namespace CS2GSI.GameState;
public struct Map
{
public string Mode, Name, Phase;
public int Round, NumMatchesToWinSeries;
public Team TeamCT, TeamT;
}

10
GameState/Player.cs Normal file
View File

@ -0,0 +1,10 @@
namespace CS2GSI.GameState;
public struct Player
{
public string SteamId, Name, Activity;
public string? Team;
public int? ObserverSlot;
public PlayerState? State;
public PlayerMatchStats? MatchStats;
}

View File

@ -0,0 +1,6 @@
namespace CS2GSI.GameState;
public struct PlayerMatchStats
{
public int Kills, Assists, Deaths, MVPs, Score;
}

7
GameState/PlayerState.cs Normal file
View File

@ -0,0 +1,7 @@
namespace CS2GSI.GameState;
public struct PlayerState
{
public int Health, Armor, Flashed, Smoked, Burning, Money, RoundKills, RoundHs, EquipmentValue;
public bool Helmet;
}

6
GameState/Team.cs Normal file
View File

@ -0,0 +1,6 @@
namespace CS2GSI.GameState;
public struct Team
{
public int Score, ConsecutiveRoundLosses, TimeoutsRemaining, MatchesWonThisSeries;
}