Peoplemon  0.1.0
Peoplemon 3 game source documentation
Fog.hpp
Go to the documentation of this file.
1 #ifndef CORE_MAPS_WEATHER_FOG_HPP
2 #define CORE_MAPS_WEATHER_FOG_HPP
3 
4 #include "Base.hpp"
5 
6 #include <BLIB/Particles.hpp>
7 #include <Core/Resources.hpp>
8 
9 namespace core
10 {
11 namespace map
12 {
13 namespace weather
14 {
15 namespace fog
16 {
17 struct Particle;
18 }
19 
25 class Fog : public Base {
26 public:
32  Fog(bool thick);
33 
37  virtual ~Fog();
38 
42  virtual Weather::Type type() const override;
43 
51  virtual void start(bl::engine::Engine& engine, bl::rc::RenderTarget& renderTarget,
52  Map& map) override;
53 
57  virtual void stop() override;
58 
62  virtual bool stopped() const override;
63 
69  virtual void update(float dt) override;
70 
71 private:
72  bl::engine::Engine* engine;
73  const float maxOpacity;
74  float targetOpacity;
75  bl::rc::res::TextureRef fogTxtr;
76  bl::pcl::ParticleManager<fog::Particle>* particles;
77 };
78 
79 } // namespace weather
80 } // namespace map
81 } // namespace core
82 
83 #endif
Core classes and functionality for both the editor and game.
core::map::weather::fog::Particle Particle
Definition: Fog.cpp:77
The primary map class that represents a usable map in the game.
Definition: Map.hpp:49
Type
The type of weather.
Definition: Weather.hpp:38
Base class for all weather types.
Definition: Base.hpp:28
Weather type for thin or thick fog.
Definition: Fog.hpp:25
virtual void stop() override
Stops the fog.
Definition: Fog.cpp:275
virtual Weather::Type type() const override
Returns ThinFog or ThickFog.
Definition: Fog.cpp:248
Fog(bool thick)
Creates foggy weather.
Definition: Fog.cpp:237
virtual void update(float dt) override
Updates the fog.
Definition: Fog.cpp:281
virtual void start(bl::engine::Engine &engine, bl::rc::RenderTarget &renderTarget, Map &map) override
Starts the fog.
Definition: Fog.cpp:252
virtual bool stopped() const override
Returns true when the fog is fully dissipated, false if not.
Definition: Fog.cpp:277
virtual ~Fog()
No more fog.
Definition: Fog.cpp:244