PersonalityContext contains a list of traits with specific bound influence measures.
More...
List of all members.
Public Member Functions |
| void | Init (Agent agent) |
| | Init performs initialization on the Personality Context.
|
| List< Trait > | GetTraits () |
| | GetTraits returns the internal list of Traits.
|
| void | Clear () |
| | Clear all Traits from the Context.
|
| void | AddTrait (Trait t) |
| | Add a Trait to the Context. The Trait is stored by reference. Duplicates are not allowed.
|
| void | RemoveTrait (Trait t) |
| | RemoveTrait removes the specified Trait object from the Context.
|
| float | GetInfluence (string name) |
| | GetInfluence determines the amount of influence the Trait currently has. Influence can be thought of as a multiplier for factors influenced by personality.
|
| Trait | GetTrait (string name) |
| | GetTrait returns the first Trait found in the Context with a matching trait name.
|
Detailed Description
PersonalityContext contains a list of traits with specific bound influence measures.
Member Function Documentation
| void RAIN.Personality.PersonalityContext.AddTrait |
( |
Trait |
t | ) |
|
Add a Trait to the Context. The Trait is stored by reference. Duplicates are not allowed.
- Parameters:
-
| void RAIN.Personality.PersonalityContext.Clear |
( |
| ) |
|
Clear all Traits from the Context.
| float RAIN.Personality.PersonalityContext.GetInfluence |
( |
string |
name | ) |
|
GetInfluence determines the amount of influence the Trait currently has. Influence can be thought of as a multiplier for factors influenced by personality.
- Parameters:
-
| name | The name of the Trait to get influence for |
- Returns:
- The influence multiplier if the Trait was found, 0 otherwise
| Trait RAIN.Personality.PersonalityContext.GetTrait |
( |
string |
name | ) |
|
GetTrait returns the first Trait found in the Context with a matching trait name.
- Parameters:
-
| name | The name of the Trait to match |
- Returns:
- Returns a matching Trait if found, otherwise null
| List<Trait> RAIN.Personality.PersonalityContext.GetTraits |
( |
| ) |
|
GetTraits returns the internal list of Traits.
- Returns:
- A List<Trait> of traits</Trait>
| void RAIN.Personality.PersonalityContext.Init |
( |
Agent |
agent | ) |
|
Init performs initialization on the Personality Context.
- Parameters:
-
| void RAIN.Personality.PersonalityContext.RemoveTrait |
( |
Trait |
t | ) |
|
RemoveTrait removes the specified Trait object from the Context.
- Parameters:
-