Isle
Loading...
Searching...
No Matches
WhoAmIVariable Class Reference

[AI] Variable representing the current player's character, allowing the game to switch the active actor accordingly. More...

#include <legovariables.h>

Inheritance diagram for WhoAmIVariable:
Collaboration diagram for WhoAmIVariable:

Public Member Functions

 WhoAmIVariable ()
 [AI] Initializes the WhoAmIVariable and sets its key to g_varWHOAMI. [AI] More...
 
void SetValue (const char *p_value) override
 [AI] Sets the current player actor in the game state based on the specified character. More...
 
- Public Member Functions inherited from MxVariable
 MxVariable ()
 [AI] Constructs an empty variable with no key or value. More...
 
 MxVariable (const char *p_key, const char *p_value)
 [AI] Constructs a variable with the specified key and value. More...
 
 MxVariable (const char *p_key)
 [AI] Constructs a variable with the specified key and no value. More...
 
virtual MxStringGetValue ()
 [AI] Retrieves a pointer to the variable's value. More...
 
virtual void SetValue (const char *p_value)
 [AI] Sets the variable's value. More...
 
virtual void Destroy ()
 [AI] Destroys the variable, deleting the object. More...
 
const MxStringGetKey () const
 [AI] Provides read-only access to the variable's key/name. More...
 

Additional Inherited Members

- Protected Attributes inherited from MxVariable
MxString m_key
 [AI] The variable's key (name), always stored in uppercase. More...
 
MxString m_value
 [AI] The variable's value. More...
 

Detailed Description

[AI] Variable representing the current player's character, allowing the game to switch the active actor accordingly.

[AI]

[AI] Accepts the value as a character name ("Papa", "Mama", "Pepper", "Nick", or "Laura") and sets the current player actor in game state. The key is set to g_varWHOAMI.

Definition at line 110 of file legovariables.h.

Constructor & Destructor Documentation

◆ WhoAmIVariable()

WhoAmIVariable::WhoAmIVariable ( )
inline

[AI] Initializes the WhoAmIVariable and sets its key to g_varWHOAMI. [AI]

Definition at line 113 of file legovariables.h.

Member Function Documentation

◆ SetValue()

void WhoAmIVariable::SetValue ( const char *  p_value)
overridevirtual

[AI] Sets the current player actor in the game state based on the specified character.

[AI]

Parameters
p_valueThe new value; must match a valid character ("Papa", "Mama", "Pepper", "Nick", or "Laura"). [AI]

Reimplemented from MxVariable.

Definition at line 155 of file legovariables.cpp.


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