1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Add particle animation, glow

This is implemented by reusing and extending the
TileAnimation code for the methods used by particles.
This commit is contained in:
sfan5 2017-01-14 16:48:49 +01:00
parent c5967f75f0
commit 7279f0b373
16 changed files with 311 additions and 78 deletions

View file

@ -27,6 +27,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "client/tile.h"
#include "localplayer.h"
#include "environment.h"
#include "tileanimation.h"
struct ClientEvent;
class ParticleManager;
@ -50,7 +51,9 @@ class Particle : public scene::ISceneNode
bool vertical,
video::ITexture *texture,
v2f texpos,
v2f texsize
v2f texsize,
const struct TileAnimationParams &anim,
u8 glow
);
~Particle();
@ -102,6 +105,10 @@ private:
bool m_collision_removal;
bool m_vertical;
v3s16 m_camera_offset;
struct TileAnimationParams m_animation;
float m_animation_time;
int m_animation_frame;
u8 m_glow;
};
class ParticleSpawner
@ -123,6 +130,7 @@ class ParticleSpawner
bool vertical,
video::ITexture *texture,
u32 id,
const struct TileAnimationParams &anim, u8 glow,
ParticleManager* p_manager);
~ParticleSpawner();
@ -156,6 +164,8 @@ class ParticleSpawner
bool m_collision_removal;
bool m_vertical;
u16 m_attached_id;
struct TileAnimationParams m_animation;
u8 m_glow;
};
/**