Exemplo n.º 1
0
 private Attr this[AttrPos pos]
 {
     get
     {
         if ((int)pos >= attrs.Count)
         {
             throw new Exception(string.Format("不存在的属性位置:{0}", pos.ToString()));
         }
         return(attrs[(int)pos]);
     }
 }
Exemplo n.º 2
0
 public void Add(AttrPos pos, Attr attr)
 {
     attrs.Insert((int)pos, attr);
 }
Exemplo n.º 3
0
 public float GetAttrAmountNormalized(AttrPos pos)
 {
     return(this[pos].GetAttrAmountNormalized());
 }
Exemplo n.º 4
0
 public int GetAttrMaxValue(AttrPos pos)
 {
     return(this[pos].ATTR_MAX);
 }
Exemplo n.º 5
0
 public int GetAttrMinValue(AttrPos pos)
 {
     return(this[pos].ATTR_MIN);
 }
Exemplo n.º 6
0
 public int GetAttrAmount(AttrPos pos)
 {
     return(this[pos].GetAttrAmount());
 }
Exemplo n.º 7
0
 public void SetAttrAmount(AttrPos pos, int value)
 {
     this[pos].SetAttrAmount(value);
     OnAttrsChangedEvent?.Invoke();
 }
Exemplo n.º 8
0
 public void DecreaseAttrAmount(AttrPos pos, int value)
 {
     this[pos].SetAttrAmount(this[pos].GetAttrAmount() - value);
     OnAttrsChangedEvent?.Invoke();
 }