public int GetStat(EPlayerStatistic type) { if (StatWithValue.TryGetValue(type, out int value)) { return(value); } return(0); }
public void AddStat(EPlayerStatistic type, int addValue = 1) { if (StatWithValue.TryGetValue(type, out int value)) { StatWithValue[type] = value + addValue; } else { StatWithValue[type] = addValue; } }