v1.4.4
This commit is contained in:
commit
9c94d113d3
10260 changed files with 1237388 additions and 0 deletions
43
source/game/StarParticleManager.hpp
Normal file
43
source/game/StarParticleManager.hpp
Normal file
|
@ -0,0 +1,43 @@
|
|||
#ifndef STAR_PARTICLE_MANAGER_HPP
|
||||
#define STAR_PARTICLE_MANAGER_HPP
|
||||
|
||||
#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<Particle> 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<Particle> const& particles() const;
|
||||
List<pair<Vec2F, Vec3B>> lightSources() const;
|
||||
|
||||
private:
|
||||
enum class TileType { Colliding, Water, Empty };
|
||||
|
||||
List<Particle> m_particles;
|
||||
List<Particle> m_nextParticles;
|
||||
|
||||
WorldGeometry m_worldGeometry;
|
||||
float m_undergroundLevel;
|
||||
ClientTileSectorArrayPtr m_tileSectorArray;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue