aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorClyne Sullivan <tullivan99@gmail.com>2017-01-06 13:30:30 -0500
committerClyne Sullivan <tullivan99@gmail.com>2017-01-06 13:30:30 -0500
commita77877d65dfa1ee74407d94e221f2c737fdf20dd (patch)
tree6192ffa41f08e4df4e0e62d5f8cf5151b3f2b624 /include
parent1358acea95c821729f3770ea5968d9476b621936 (diff)
particle VBOs
Diffstat (limited to 'include')
-rw-r--r--include/weather.hpp10
1 files changed, 7 insertions, 3 deletions
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<ParticleSystem>();
+ 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