Пример #1
0
        public void Update(TimeSpan elapsedTime)
        {
            if (Duration == -1)
                return;

            TimeLeft -= elapsedTime;
            if (TimeLeft.TotalMilliseconds < 0)
            {
                TimeLeft = TimeSpan.Zero;
                AttributeModifiers = new Attributes();
            }
        }
Пример #2
0
 public Modifier(Attributes attributeModifiers, int duration)
 {
     AttributeModifiers = attributeModifiers;
     Duration = duration;
     TimeLeft = TimeSpan.FromSeconds(duration);
 }
Пример #3
0
 public Modifier(Attributes attributeModifiers)
 {
     AttributeModifiers = attributeModifiers;
     Duration = -1;
     TimeLeft = TimeSpan.Zero;
 }