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

Weather type for rainy days. Handles light and hard rain and owns thunder if need be. More...

#include <Rain.hpp>

+ Inheritance diagram for core::map::weather::Rain:

Public Member Functions

 Rain (bool hard, bool thunder)
 Construct a new Rain system. More...
 
virtual ~Rain ()
 Destroy the Rain. More...
 
virtual Weather::Type type () const override
 One of LightRain, LightRainThunder, HardRain, or HardRainThunder. More...
 
virtual void start (bl::engine::Engine &engine, bl::rc::RenderTarget &renderTarget, Map &map) override
 Start the rain. More...
 
virtual void stop () override
 Stop the rain. More...
 
virtual bool stopped () const override
 Returns true when all rain is fallen after stop() is called. More...
 
virtual void update (float dt) override
 Updates the rain. More...
 

Detailed Description

Weather type for rainy days. Handles light and hard rain and owns thunder if need be.

Definition at line 34 of file Rain.hpp.

Constructor & Destructor Documentation

◆ Rain()

core::map::weather::Rain::Rain ( bool  hard,
bool  thunder 
)

Construct a new Rain system.

Parameters
hardTrue to make hard rain, false for light
thunderTrue for periodic thunder, false for no thunder

Definition at line 196 of file Rain.cpp.

◆ ~Rain()

core::map::weather::Rain::~Rain ( )
virtual

Destroy the Rain.

Definition at line 212 of file Rain.cpp.

Member Function Documentation

◆ start()

void core::map::weather::Rain::start ( bl::engine::Engine &  engine,
bl::rc::RenderTarget &  renderTarget,
Map map 
)
overridevirtual

Start the rain.

Parameters
engineThe game engine instance
renderTargetThe render target the weather will be rendered to
mapThe map the weather is in

Implements core::map::weather::Base.

Definition at line 220 of file Rain.cpp.

◆ stop()

void core::map::weather::Rain::stop ( )
overridevirtual

Stop the rain.

Implements core::map::weather::Base.

Definition at line 257 of file Rain.cpp.

◆ stopped()

bool core::map::weather::Rain::stopped ( ) const
overridevirtual

Returns true when all rain is fallen after stop() is called.

Returns
True if rain done terminating, false if rain still falling

Implements core::map::weather::Base.

Definition at line 263 of file Rain.cpp.

◆ type()

Weather::Type core::map::weather::Rain::type ( ) const
overridevirtual

One of LightRain, LightRainThunder, HardRain, or HardRainThunder.

Implements core::map::weather::Base.

Definition at line 218 of file Rain.cpp.

◆ update()

void core::map::weather::Rain::update ( float  dt)
overridevirtual

Updates the rain.

Parameters
dtTime elapsed since last call to update, in seconds

Implements core::map::weather::Base.

Definition at line 265 of file Rain.cpp.


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