Peoplemon  0.1.0
Peoplemon 3 game source documentation
Sunny.hpp
Go to the documentation of this file.
1 #ifndef CORE_MAPS_WEATHER_SUNNY_HPP
2 #define CORE_MAPS_WEATHER_SUNNY_HPP
3 
4 #include "Base.hpp"
5 
6 #include <Core/Resources.hpp>
7 #include <SFML/Graphics.hpp>
8 
9 namespace core
10 {
11 namespace map
12 {
13 namespace weather
14 {
21 class Sunny : public Base {
22 public:
27  Sunny();
28 
33  virtual ~Sunny() = default;
34 
39  virtual Weather::Type type() const override;
40 
48  virtual void start(bl::engine::Engine& engine, bl::rc::RenderTarget& renderTarget,
49  Map& map) override;
50 
55  virtual void stop() override;
56 
61  virtual bool stopped() const override;
62 
68  virtual void update(float dt) override;
69 
70 private:
71  float t;
72  float factor;
73  bool stopping;
74  Map* map;
75 };
76 
77 } // namespace weather
78 } // namespace map
79 } // namespace core
80 
81 #endif
Core classes and functionality for both the editor and game.
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
Makes sunny weather.
Definition: Sunny.hpp:21
virtual ~Sunny()=default
Destroy the Sunny object.
virtual void update(float dt) override
Updates the sunny weather.
Definition: Sunny.cpp:48
virtual bool stopped() const override
Returns true when the sun is finished fading.
Definition: Sunny.cpp:46
virtual void start(bl::engine::Engine &engine, bl::rc::RenderTarget &renderTarget, Map &map) override
Starts the sunny weather.
Definition: Sunny.cpp:37
Sunny()
Construct a new Sunny object.
Definition: Sunny.cpp:30
virtual Weather::Type type() const override
Returns Sunny.
Definition: Sunny.cpp:35
virtual void stop() override
Stops the sunny weather.
Definition: Sunny.cpp:44