Artemis.Profiles.Layers.Models.EventPropertiesModel.MustStop C# (CSharp) Method

MustStop() public method

Gets whether the event should stop
public MustStop ( LayerModel layer ) : bool
layer LayerModel
return bool
        public virtual bool MustStop(LayerModel layer)
        {
            if (ExpirationType == ExpirationType.Time)
            {
                if (EventTriggerTime == DateTime.MinValue)
                    return false;
                return DateTime.Now - EventTriggerTime > Length;
            }
            if (ExpirationType == ExpirationType.Animation)
                return (layer.LayerAnimation == null) || layer.LayerAnimation.MustExpire(layer);

            return true;
        }