Peoplemon  0.1.0
Peoplemon 3 game source documentation
Sandstorm.hpp
Go to the documentation of this file.
1 #ifndef CORE_MAPS_WEATHER_SANDSTORM_HPP
2 #define CORE_MAPS_WEATHER_SANDSTORM_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 sandstorm
16 {
17 struct Sand;
18 struct Swirl;
19 } // namespace sandstorm
20 
26 class Sandstorm : public Base {
27 public:
31  Sandstorm();
32 
36  virtual ~Sandstorm();
37 
41  virtual Weather::Type type() const override;
42 
50  virtual void start(bl::engine::Engine& engine, bl::rc::RenderTarget& renderTarget,
51  Map& map) override;
52 
56  virtual void stop() override;
57 
61  virtual bool stopped() const override;
62 
68  virtual void update(float dt) override;
69 
70 private:
71  bl::engine::Engine* engine;
72  bl::rc::res::TextureRef sandTxtr;
73  bl::rc::res::TextureRef swirlTxtr;
74  bl::pcl::ParticleManager<sandstorm::Sand>* sand;
75  bl::pcl::ParticleManager<sandstorm::Swirl>* swirls;
76  float targetAlpha;
77  float alpha;
78 
79  void setAlpha();
80 };
81 
82 } // namespace weather
83 } // namespace map
84 } // namespace core
85 
86 #endif
Core classes and functionality for both the editor and game.
core::map::weather::sandstorm::Swirl Swirl
Definition: Sandstorm.cpp:73
core::map::weather::sandstorm::Sand Sand
Definition: Sandstorm.cpp:72
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
Creates sandstorms.
Definition: Sandstorm.hpp:26
virtual bool stopped() const override
Returns true if the sandstorm is fully stopped, false if stopping.
Definition: Sandstorm.cpp:348
virtual void update(float dt) override
Updates the sandstorm.
Definition: Sandstorm.cpp:390
virtual void start(bl::engine::Engine &engine, bl::rc::RenderTarget &renderTarget, Map &map) override
Starts the sandstorm.
Definition: Sandstorm.cpp:350
Sandstorm()
Creates the sandstorm.
Definition: Sandstorm.cpp:333
virtual void stop() override
Stops the sandstorm.
Definition: Sandstorm.cpp:346
virtual ~Sandstorm()
Destroy the Sandstorm object.
Definition: Sandstorm.cpp:337
virtual Weather::Type type() const override
Returns Sandstorm.
Definition: Sandstorm.cpp:344