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 Person Person { get; protected set; }
Property Value
SourceString
The SourceString of the IEmotionSource that caused this emotion modifier to occur. If there is no source, null is returned.
[DataMember]
public string SourceString { get; protected set; }
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(Person)
Validates this emotion modifier using the given Person after it is loaded from disk. This method is automatically called in Validate().
public bool Validate(Person person)
Parameters
person
PersonThe person that this emotion modifier belongs to
Returns
- bool
Whether this emotion modifier is still valid