예제 #1
0
파일: Player.cs 프로젝트: mcsoaa/CardGame2
 public void SetStats(PlayerStatsType type, int value)
 {
     if (_stats[type] == value)
     {
         return;
     }
     _stats[type] = value;
     NotifyStatsChange();
 }
예제 #2
0
        /// <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;
            }
        }
예제 #3
0
 public PlayerStat(PlayerStatsType s, int v)
 {
     stat  = s;
     value = v;
 }
예제 #4
0
파일: Player.cs 프로젝트: mcsoaa/CardGame2
 public int GetStats(PlayerStatsType type)
 {
     return(_stats[type]);
 }