ToString Overrides for Gamestates
This commit is contained in:
parent
7ad7c80697
commit
b4b6f1dbb5
@ -5,4 +5,12 @@ public struct CS2GameState
|
||||
public int Timestamp;
|
||||
public Map? Map;
|
||||
public Player? Player;
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"{GetType()}\n" +
|
||||
$"\tTime: {Timestamp}\n" +
|
||||
$"\t{Map}\n" +
|
||||
$"\t{Player}\n";
|
||||
}
|
||||
}
|
@ -5,4 +5,13 @@ public struct Map
|
||||
public string Mode, Name, Phase;
|
||||
public int Round, NumMatchesToWinSeries;
|
||||
public Team TeamCT, TeamT;
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"{GetType()}\n" +
|
||||
$"\t{Mode} {Name} {Round} Matches to Win Series: {NumMatchesToWinSeries}\n" +
|
||||
$"\t{Phase}\n" +
|
||||
$"\t{TeamCT}\n" +
|
||||
$"\t{TeamT}\n";
|
||||
}
|
||||
}
|
@ -7,4 +7,12 @@ public struct Player
|
||||
public int? ObserverSlot;
|
||||
public PlayerState? State;
|
||||
public PlayerMatchStats? MatchStats;
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"{GetType()}\n" +
|
||||
$"\t{Name} {SteamId} {Activity} {Team}\n" +
|
||||
$"\t{State}\n" +
|
||||
$"\t{MatchStats}\n";
|
||||
}
|
||||
}
|
@ -3,4 +3,12 @@
|
||||
public struct PlayerMatchStats
|
||||
{
|
||||
public int Kills, Assists, Deaths, MVPs, Score;
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"{GetType()}\n" +
|
||||
$"\tKAD: {Kills} {Assists} {Deaths}\n" +
|
||||
$"\tMVPs: {MVPs}\n" +
|
||||
$"\tScore: {Score}\n";
|
||||
}
|
||||
}
|
@ -4,4 +4,18 @@ public struct PlayerState
|
||||
{
|
||||
public int Health, Armor, Flashed, Smoked, Burning, Money, RoundKills, RoundHs, EquipmentValue;
|
||||
public bool Helmet;
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"{GetType()}\n" +
|
||||
$"\tHealth: {Health}\n" +
|
||||
$"\tArmor: {Armor}\n" +
|
||||
$"\tFlashed: {Flashed}\n" +
|
||||
$"\tSmoked: {Smoked}\n" +
|
||||
$"\tBurning: {Burning}\n" +
|
||||
$"\tMoney: {Money}\n" +
|
||||
$"\tRoundKills: {RoundKills}\n" +
|
||||
$"\tRoundHs: {RoundHs}\n" +
|
||||
$"\tEquipmentValue: {EquipmentValue}\n";
|
||||
}
|
||||
}
|
@ -3,4 +3,13 @@
|
||||
public struct Team
|
||||
{
|
||||
public int Score, ConsecutiveRoundLosses, TimeoutsRemaining, MatchesWonThisSeries;
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"{GetType()}\n" +
|
||||
$"\tScore: {Score}\n" +
|
||||
$"\tConsecutiveRoundLosses: {ConsecutiveRoundLosses}\n" +
|
||||
$"\tTimeoutsRemaining: {TimeoutsRemaining}\n" +
|
||||
$"\tMatchesWonThisSeries: {MatchesWonThisSeries}\n";
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user