Peoplemon  0.1.0
Peoplemon 3 game source documentation
Public Types | Public Member Functions | List of all members
core::map::Weather Class Reference

Parent weather system for maps. Manages active weather. More...

#include <Weather.hpp>

Public Types

enum  Type : std::uint8_t {
  None = 0 , AllRandom = 1 , LightRain = 2 , LightRainThunder = 3 ,
  HardRain = 4 , HardRainThunder = 5 , LightSnow = 6 , LightSnowThunder = 7 ,
  HardSnow = 8 , HardSnowThunder = 9 , ThinFog = 10 , ThickFog = 11 ,
  Sunny = 12 , SandStorm = 13 , WaterRandom = 14 , SnowRandom = 15 ,
  DesertRandom = 16
}
 The type of weather. More...
 

Public Member Functions

 Weather ()
 Initializes the weather system with None. More...
 
 ~Weather ()
 Terminates active weather. More...
 
void activate (system::Systems &systems, Map &map)
 Activates the weather system. More...
 
void set (Type type, bool immediate=false)
 Sets the current weather type. More...
 
Type getType () const
 Returns the current type of weather. More...
 
void update (float dt)
 Updates the current weather. More...
 

Detailed Description

Parent weather system for maps. Manages active weather.

Definition at line 32 of file Weather.hpp.

Member Enumeration Documentation

◆ Type

enum core::map::Weather::Type : std::uint8_t

The type of weather.

Enumerator
None 

No weather will occur.

AllRandom 

All types of weather may occur over time.

LightRain 

Light rain with no thunder.

LightRainThunder 

Light rain with thunder.

HardRain 

Hard rain with no thunder.

HardRainThunder 

Hard rain with thunder.

LightSnow 

Light snow with no thunder.

LightSnowThunder 

Light snow with thunder.

HardSnow 

Hard snow with no thunder.

HardSnowThunder 

Hard snow with thunder.

ThinFog 

Thin fog covers the area.

ThickFog 

Thick fog obscures everything.

Sunny 

A very sunny day with pulsating light.

SandStorm 

A sandstorm ravages you.

WaterRandom 

Periodically triggers one of LightRain, HardRain, LightRainThunder, HardRainThunder.

SnowRandom 

Periodically triggers one of LightSnow, HardSnow, LightSnowThunder, HardSnowThunder.

DesertRandom 

Periodically triggers one of Sunny, Sandstorm.

Definition at line 38 of file Weather.hpp.

Constructor & Destructor Documentation

◆ Weather()

core::map::Weather::Weather ( )

Initializes the weather system with None.

Definition at line 40 of file Weather.cpp.

◆ ~Weather()

core::map::Weather::~Weather ( )

Terminates active weather.

Definition at line 47 of file Weather.cpp.

Member Function Documentation

◆ activate()

void core::map::Weather::activate ( system::Systems systems,
Map map 
)

Activates the weather system.

Parameters
systemsThe main game systems
mapThe map that the weather is in

Definition at line 49 of file Weather.cpp.

◆ getType()

Weather::Type core::map::Weather::getType ( ) const

Returns the current type of weather.

Definition at line 66 of file Weather.cpp.

◆ set()

void core::map::Weather::set ( Type  type,
bool  immediate = false 
)

Sets the current weather type.

Parameters
typeThe type of weather to transition to
immediateTrue to skip the stop phase of the current weather

Definition at line 54 of file Weather.cpp.

◆ update()

void core::map::Weather::update ( float  dt)

Updates the current weather.

Parameters
dtTime elapsed since last call to update() in seconds

Definition at line 68 of file Weather.cpp.


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