From a77877d65dfa1ee74407d94e221f2c737fdf20dd Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Fri, 6 Jan 2017 13:30:30 -0500 Subject: particle VBOs --- include/weather.hpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/weather.hpp b/include/weather.hpp index f7b53f1..3aac2e6 100644 --- a/include/weather.hpp +++ b/include/weather.hpp @@ -38,14 +38,18 @@ public: (void)dt; static auto& partSystem = *game::engine.getSystem(); + static int newPartDelay = 0; // TODO no switch (weather) { case Weather::Sunny: break; case Weather::Rainy: - partSystem.add(vec2(offset.x - game::SCREEN_WIDTH / 2 + randGet() % game::SCREEN_WIDTH, - offset.y + game::SCREEN_HEIGHT / 2 + 100), - ParticleType::Drop); + if (newPartDelay++ == 4) { + newPartDelay = 0; + partSystem.add(vec2(offset.x - game::SCREEN_WIDTH / 2 + randGet() % game::SCREEN_WIDTH, + offset.y + game::SCREEN_HEIGHT / 2 + 100), + ParticleType::Drop); + } break; // TODO case Weather::Snowy: break; // TODO -- cgit v1.2.3