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

Variable controlling the sky background color (HSV) and related light color in the game. More...

#include <legogamestate.h>

Inheritance diagram for LegoBackgroundColor:
Collaboration diagram for LegoBackgroundColor:

Public Member Functions

 LegoBackgroundColor ()
 
 LegoBackgroundColor (const char *p_key, const char *p_value)
 
void SetValue (const char *p_colorString) override
 Sets the value of the background color using a command string. More...
 
void SetLightColor (float p_r, float p_g, float p_b)
 Sets the global scene light color based on RGB values. More...
 
void SetLightColor ()
 Sets the light color according to the current HSV parameters. [AI]. More...
 
void ToggleDayNight (MxBool p_sun)
 Adjusts the saturation (day/night) and updates sky color and light accordingly. More...
 
void ToggleSkyColor ()
 Rotates hue to cycle sky color (e.g. progressing through the day), updating all visuals. [AI]. 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

Variable controlling the sky background color (HSV) and related light color in the game.

[AI] Used for both persistent and temporary background color handling. [AI]

Definition at line 30 of file legogamestate.h.

Constructor & Destructor Documentation

◆ LegoBackgroundColor() [1/2]

LegoBackgroundColor::LegoBackgroundColor ( )

Definition at line 1197 of file legogamestate.cpp.

◆ LegoBackgroundColor() [2/2]

LegoBackgroundColor::LegoBackgroundColor ( const char *  p_key,
const char *  p_value 
)

Definition at line 1206 of file legogamestate.cpp.

Member Function Documentation

◆ SetLightColor() [1/2]

void LegoBackgroundColor::SetLightColor ( )

Sets the light color according to the current HSV parameters. [AI].

Definition at line 1330 of file legogamestate.cpp.

◆ SetLightColor() [2/2]

void LegoBackgroundColor::SetLightColor ( float  p_r,
float  p_g,
float  p_b 
)

Sets the global scene light color based on RGB values.

[AI]

Parameters
p_rRed value in range 0..1 [AI]
p_gGreen value in range 0..1 [AI]
p_bBlue value in range 0..1 [AI]

Definition at line 1304 of file legogamestate.cpp.

◆ SetValue()

void LegoBackgroundColor::SetValue ( const char *  p_colorString)
overridevirtual

Sets the value of the background color using a command string.

Accepts strings like "set 56 54 68" to update HSV and set sky color. [AI]

Parameters
p_colorStringColor command string to parse. [AI]

Reimplemented from MxVariable.

Definition at line 1215 of file legogamestate.cpp.

◆ ToggleDayNight()

void LegoBackgroundColor::ToggleDayNight ( MxBool  p_sun)

Adjusts the saturation (day/night) and updates sky color and light accordingly.

[AI]

Parameters
p_sunTRUE to increase (day), FALSE to decrease (night) [AI]

Definition at line 1256 of file legogamestate.cpp.

◆ ToggleSkyColor()

void LegoBackgroundColor::ToggleSkyColor ( )

Rotates hue to cycle sky color (e.g. progressing through the day), updating all visuals. [AI].

Definition at line 1284 of file legogamestate.cpp.


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