java.io.Serializablepublic class Motivator
extends java.lang.Object
implements java.io.Serializable
| Modifier and Type | Field | Description |
|---|---|---|
static float |
MotivatorDecayFactor |
Constant value that defines how fast should a drive decay over time.
|
| Constructor | Description |
|---|---|
Motivator(short type,
float decayFactor,
float weight,
float intensity) |
Creates a new Motivator
|
Motivator(Motivator mot) |
Creates a new Motivator that consists in a copy of a given motivator
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
DecayMotivator() |
Decays the motivator intensity according to the system's timer
|
float |
GetDecayFactor() |
|
float |
GetIntensity() |
Gets the motivator's intensity
|
float |
GetNeed() |
Deprecated.
use GetNeedUrgency() instead.
|
float |
GetNeedUrgency() |
Gets the motivator's urgency discretizing the need intensity into diffent
categories (very urgent, urgent, not urgent, satisfied)
|
short |
GetType() |
Gets the motivator's type
|
float |
GetWeight() |
Gets the motivator's weight
|
void |
SetDecayFactor(float newAffiliationDecayFactor) |
|
void |
SetIntensity(float intensity) |
Set the motivator's intensity
|
void |
SetWeight(float weight) |
|
java.lang.String |
toXml() |
Converts the Motivator to XMl
|
float |
UpdateIntensity(float effect) |
Update the motivator's intensity
|
public static final float MotivatorDecayFactor
public Motivator(short type,
float decayFactor,
float weight,
float intensity)
type - - the type of built-in motivator // * @param threshold - the
min value for the motivator that the character wants to
maintaindecayFactor - - the decay factor for the intensity of the motivator over
timeweight - - the weight of the motivatorintensity - - intensity of the built-in motivator, the higher the
intensity the lower the need due to a smaller deviation from
the threshold, this value will be pre-defined based on
scenariopublic Motivator(Motivator mot)
mot - - the motivator that will be copied into the new motivatorpublic short GetType()
MotivatorTypepublic float GetWeight()
public void SetWeight(float weight)
public float GetIntensity()
public float GetNeed()
public float GetNeedUrgency()
public float UpdateIntensity(float effect)
public void SetIntensity(float intensity)
public void DecayMotivator()
public java.lang.String toXml()
public float GetDecayFactor()
public void SetDecayFactor(float newAffiliationDecayFactor)