#pragma once #include "StarWorldGeometry.hpp" #include "StarParticle.hpp" #include "StarWorldTiles.hpp" namespace Star { STAR_CLASS(ParticleManager); class ParticleManager { public: ParticleManager(WorldGeometry const& worldGeometry, ClientTileSectorArrayPtr const& tileSectorArray); void add(Particle particle); void addParticles(List particles); size_t count() const; void clear(); void setUndergroundLevel(float undergroundLevel); // Updates current particles and spawns new weather particles void update(float dt, RectF const& cullRegion, float wind); List const& particles() const; List> lightSources() const; private: enum class TileType { Colliding, Water, Empty }; List m_particles; List m_nextParticles; WorldGeometry m_worldGeometry; float m_undergroundLevel; ClientTileSectorArrayPtr m_tileSectorArray; }; }