public void SetStats(PlayerStatsType type, int value) { if (_stats[type] == value) { return; } _stats[type] = value; NotifyStatsChange(); }
/// <summary> /// Set the text of the text box. /// </summary> /// <param name="type"></param> /// <param name="text"></param> public void SetText(PlayerStatsType type, int current, int max) { switch (type) { case PlayerStatsType.Hp: HpBar.SetValue(current, max); break; case PlayerStatsType.Metal: MetalBar.SetValue(current, max); break; case PlayerStatsType.Crystal: CrystalBar.SetValue(current, max); break; case PlayerStatsType.Deuterium: DeuteriumBar.SetValue(current, max); break; } }
public PlayerStat(PlayerStatsType s, int v) { stat = s; value = v; }
public int GetStats(PlayerStatsType type) { return(_stats[type]); }