Loading...
Searching...
No Matches
PixelCrushers.LoveHate.EmotionalState Class Reference

This optional component adds a more customizable emotion model based on PAD values than the PAD's built-in Temperament value. More...

Inheritance diagram for PixelCrushers.LoveHate.EmotionalState:
Collaboration diagram for PixelCrushers.LoveHate.EmotionalState:

Public Types

enum  EmotionMatchMode { BestFit , Sequentially }
 

Public Member Functions

void Awake ()
 
void UpdateEmotionalState ()
 Updates the current emotion based on the faction member's PAD values.
 
string GetCurrentEmotionName ()
 Returns the name of the current emotion determined by the faction member's PAD values.
 
int GetCurrentEmotion ()
 Returns the current emotion determined by the faction member's PAD values.
 
bool IsWithinEmotionRange (EmotionDefinition emotionDefinition)
 Returns true if the current PAD values fall within the ranges specified by an emotionDefinition.
 
float GetEmotionDistance (EmotionDefinition emotionDefinition)
 Returns distance between PAD values and average of emotion's range.
 
void OnModifyPad (float happinessChange, float pleasureChange, float arousalChange, float dominanceChange)
 Updates the current emotion whenever the faction member's PAD values change.
 

Static Public Member Functions

static List< string > ZonePluginActivator ()
 For optional UtopiaWorx Zone Controller integration.
 

Public Attributes

EmotionModel emotionModelTemplate
 The template to use when defining emotions.
 
EmotionDefinition[] emotionDefinitions = new EmotionDefinition[0]
 The emotion definitions for this faction member.
 
EmotionMatchMode emotionMatchMode = EmotionMatchMode.BestFit
 Specifies how to match emotion to PAD values.
 
int currentEmotion = -1
 Index into emotionDefinitions of the current emotion based on the faction member's PAD values.
 
string currentEmotionName = string.Empty
 The emotion name associated with the current emotion.
 

Detailed Description

This optional component adds a more customizable emotion model based on PAD values than the PAD's built-in Temperament value.

Member Enumeration Documentation

◆ EmotionMatchMode

Enumerator
BestFit 
Sequentially 

Member Function Documentation

◆ Awake()

void PixelCrushers.LoveHate.EmotionalState.Awake ( )
inline

◆ GetCurrentEmotion()

int PixelCrushers.LoveHate.EmotionalState.GetCurrentEmotion ( )
inline

Returns the current emotion determined by the faction member's PAD values.

Identifies the emotion that most closely matches the PAD values.

Returns

◆ GetCurrentEmotionName()

string PixelCrushers.LoveHate.EmotionalState.GetCurrentEmotionName ( )
inline

Returns the name of the current emotion determined by the faction member's PAD values.

Returns

◆ GetEmotionDistance()

float PixelCrushers.LoveHate.EmotionalState.GetEmotionDistance ( EmotionDefinition  emotionDefinition)
inline

Returns distance between PAD values and average of emotion's range.

Parameters
emotionDefinitionEmotion definition to check
Returns
Distance, or MaxEmotionDistance if PAD is not in emotion's range.

◆ IsWithinEmotionRange()

bool PixelCrushers.LoveHate.EmotionalState.IsWithinEmotionRange ( EmotionDefinition  emotionDefinition)
inline

Returns true if the current PAD values fall within the ranges specified by an emotionDefinition.

Parameters
emotionDefinitionEmotion definition to check
Returns
True if within the range

◆ OnModifyPad()

void PixelCrushers.LoveHate.EmotionalState.OnModifyPad ( float  happinessChange,
float  pleasureChange,
float  arousalChange,
float  dominanceChange 
)
inline

Updates the current emotion whenever the faction member's PAD values change.

Implements PixelCrushers.LoveHate.IModifyPadDeedEventHandler.

◆ UpdateEmotionalState()

void PixelCrushers.LoveHate.EmotionalState.UpdateEmotionalState ( )
inline

Updates the current emotion based on the faction member's PAD values.

◆ ZonePluginActivator()

static List< string > PixelCrushers.LoveHate.EmotionalState.ZonePluginActivator ( )
inlinestatic

For optional UtopiaWorx Zone Controller integration.

Returns
The properties that Zone Controller can control.

Member Data Documentation

◆ currentEmotion

int PixelCrushers.LoveHate.EmotionalState.currentEmotion = -1

Index into emotionDefinitions of the current emotion based on the faction member's PAD values.

◆ currentEmotionName

string PixelCrushers.LoveHate.EmotionalState.currentEmotionName = string.Empty

The emotion name associated with the current emotion.

◆ emotionDefinitions

EmotionDefinition [] PixelCrushers.LoveHate.EmotionalState.emotionDefinitions = new EmotionDefinition[0]

The emotion definitions for this faction member.

◆ emotionMatchMode

EmotionMatchMode PixelCrushers.LoveHate.EmotionalState.emotionMatchMode = EmotionMatchMode.BestFit

Specifies how to match emotion to PAD values.

◆ emotionModelTemplate

EmotionModel PixelCrushers.LoveHate.EmotionalState.emotionModelTemplate

The template to use when defining emotions.


The documentation for this class was generated from the following file: