1 #ifndef CORE_MAPS_WEATHER_RAIN_HPP
2 #define CORE_MAPS_WEATHER_RAIN_HPP
7 #include <BLIB/Audio.hpp>
8 #include <BLIB/Particles.hpp>
9 #include <BLIB/Resources.hpp>
10 #include <BLIB/Util/Random.hpp>
11 #include <SFML/Graphics/RectangleShape.hpp>
12 #include <SFML/Graphics/Sprite.hpp>
13 #include <SFML/Graphics/Texture.hpp>
14 #include <SFML/System/Vector3.hpp>
42 Rain(
bool hard,
bool thunder);
61 virtual void start(bl::engine::Engine& engine, bl::rc::RenderTarget& renderTarget,
67 virtual void stop()
override;
74 virtual bool stopped()
const override;
81 virtual void update(
float dt)
override;
84 bl::engine::Engine* engine;
85 bl::pcl::ParticleManager<rain::Raindrop>* particles;
88 const unsigned int targetParticleCount;
89 const glm::vec2 velocity;
90 const float fallSpeed;
94 bl::rc::res::TextureRef dropTxtr;
95 bl::rc::res::TextureRef splash1Txtr;
96 bl::rc::res::TextureRef splash2Txtr;
98 bl::audio::AudioSystem::Handle rainSoundHandle;
Core classes and functionality for both the editor and game.
core::map::weather::rain::Raindrop Raindrop
The primary map class that represents a usable map in the game.
Base class for all weather types.
Weather type for rainy days. Handles light and hard rain and owns thunder if need be.
virtual void stop() override
Stop the rain.
virtual bool stopped() const override
Returns true when all rain is fallen after stop() is called.
virtual void start(bl::engine::Engine &engine, bl::rc::RenderTarget &renderTarget, Map &map) override
Start the rain.
virtual Weather::Type type() const override
One of LightRain, LightRainThunder, HardRain, or HardRainThunder.
Rain(bool hard, bool thunder)
Construct a new Rain system.
virtual ~Rain()
Destroy the Rain.
virtual void update(float dt) override
Updates the rain.
Simple helper class for creating thunder in different weather types.