Esempio n. 1
0
        public virtual void setAttribute(String key, object value, Attribute.Type type)
        {
            Attribute attr;

            if ((type == Attribute.Type.BOOL) && (!((bool)value)))
            {
                attr = null;
            }
            else
            {
                attr = new Attribute(type, value);
            }
            this.setRawAttribute(key, attr);
        }
Esempio n. 2
0
    private int GetAtribute(Attribute.Type type)
    {
        int result = 0;

        foreach (Attribute attribute in CatCharacter.attributes)
        {
            if (attribute.type == type)
            {
                result += attribute.value;
            }
        }
        foreach (MoodletEffect mood in CatCharacter.effects)
        {
            foreach (Attribute effect in mood.effects)
            {
                if (effect.type == type)
                {
                    result += effect.value;
                }
            }
        }
        return(result);
    }
Esempio n. 3
0
 public AttributeReplacement(String key, object value, Attribute.Type type) : base(key)
 {
     this.value = value;
     this.type  = type;
 }