Ejemplo n.º 1
0
        public void RemoveEffect(Effect effect)
        {
            Effects.Remove(effect);
            effect.OnRemove(this);

            if (!isDoll)
            {
                CmdUpdateStats(Brawn.ToDataString(), Speed.ToDataString(), Intellect.ToDataString(), Willpower.ToDataString(),
                    Wounds.ToDataString(), Traumas.ToDataString(), gameObject.transform.FindChild("Model").GetChild(0).gameObject.name.Replace("(Clone)", ""));
            }
        }
Ejemplo n.º 2
0
        public void AddEffect(Effect effect)
        {
            if (Effects.ContainsKey(effect))
            {
                if (effect.Duration > 0)
                {
                    Effects[effect] += effect.Duration;
                }
                else
                {
                    Effects[effect] -= 1;
                }
            }
            else
            {
                if (effect.Duration < 0)
                    Effects.Add(effect, -1);
                else
                    Effects.Add(effect, effect.Duration + Time.time);
                effect.OnAdd(this);
            }

            if (!isDoll)
            {
                CmdUpdateStats(Brawn.ToDataString(), Speed.ToDataString(), Intellect.ToDataString(), Willpower.ToDataString(),
                    Wounds.ToDataString(), Traumas.ToDataString(), gameObject.transform.FindChild("Model").GetChild(0).gameObject.name.Replace("(Clone)", ""));
            }
        }