Exemplo n.º 1
0
    public void changePropertyPer(AttributeData.AttrType type, float value)
    {
        float exist  = getProperty(type);
        float result = Math.Max(0f, exist + value * exist * 0.01f);

        setProperty(type, result);
    }
Exemplo n.º 2
0
    public int getPropertyBar(AttributeData.AttrType type)
    {
        float value = getProperty(type);
        float limit = getOriginalProperty(type);

        return((int)(value / limit * 100));
    }
Exemplo n.º 3
0
 public float getOriginalProperty(AttributeData.AttrType type)
 {
     return(attrDataOriginal.toValue(type));
 }
Exemplo n.º 4
0
 public void resetProperty(AttributeData.AttrType type)
 {
     setProperty(type, getOriginalProperty(type));
 }
Exemplo n.º 5
0
 public void setProperty(AttributeData.AttrType type, float value)
 {
     attrData.setAttribute(type, value);
 }