Class EmotionModifier.Instance
This class represents an applied instance of a EmotionModifier. It is used by AddEmotion(EmotionModifier, int, TimeSpan, IEmotionSource, bool).
[DataContract]
public class EmotionModifier.Instance
- Inheritance
-
EmotionModifier.Instance
- Inherited Members
- Extension Methods
Fields
Amount
The amount that this emotion modifier's Type has
[DataMember]
public readonly int Amount
Field Value
TotalTime
The total amount of in-game time that this emotion modifier lasts for
[DataMember]
public readonly TimeSpan TotalTime
Field Value
Type
The emotion modifier that this instance contains
[DataMember]
public readonly EmotionModifier Type
Field Value
Properties
Person
The person that is currently experiencing this emotion.
public PersonLike Person { get; protected set; }
Property Value
Source
The IEmotionSource that caused this emotion modifier to occur. If there is no source, null is returned.
public IEmotionSource Source { get; }
Property Value
Time
The amount of in-game time remaining of this modifier, out of TotalTime
[DataMember]
public TimeSpan Time { get; protected set; }
Property Value
Methods
PassTime(TimeSpan)
public void PassTime(TimeSpan passedInGame)
Parameters
passedInGame
TimeSpanThe amount of time that should pass
Validate(PersonLike)
Validates this emotion modifier using the given PersonLike after it is loaded from disk. This method is automatically called in Validate(AppliedMigrations).
public bool Validate(PersonLike person)
Parameters
person
PersonLikeThe person that this emotion modifier belongs to
Returns
- bool
Whether this emotion modifier is still valid