Particule.hpp
Go to the documentation of this file.
1 
6 #pragma once
7 
8 namespace ege {
9  class ParticuleEngine;
10 };
11 
12 #include <etk/types.hpp>
13 #include <ege/Environement.hpp>
14 #include <ege/camera/Camera.hpp>
15 
16 
17 namespace ege {
23  class Particule {
24  protected:
25  ege::ParticuleEngine* m_particuleEngine;
26  const char* m_particuleType;
27  public:
33  Particule(ege::ParticuleEngine* _particuleEngine, const char* _particuleType = nullptr);
37  virtual ~Particule() { };
41  virtual void init() { };
45  virtual void UnInit() { };
50  virtual void update(float _delta) { };
54  virtual void draw(const ege::Camera& _camera) { };
60  virtual bool needRemove() {
61  return false;
62  };
67  const char* getParticuleType() {
68  return m_particuleType;
69  };
73  virtual void onEnd() {};
74  };
75 }
76 
77 
78 
virtual void onEnd()
When the particule arrive to his end of life, this function is called.
Definition: Particule.hpp:73
virtual ~Particule()
Destructor.
Definition: Particule.hpp:37
const char * getParticuleType()
get the type of the particule
Definition: Particule.hpp:67
Definition: AudioElement.hpp:8
Definition: Camera.hpp:18
virtual void draw(const ege::Camera &_camera)
draw the current particule
Definition: Particule.hpp:54
virtual void UnInit()
Un-init the particule.
Definition: Particule.hpp:45
Definition: ParticuleEngine.hpp:16
virtual bool needRemove()
Check if the element might be removed.
Definition: Particule.hpp:60
Particule(ege::ParticuleEngine *_particuleEngine, const char *_particuleType=nullptr)
Constructor.
virtual void update(float _delta)
update the paticule properties
Definition: Particule.hpp:50
The particule class is an element with no control, when it will be created, it does not have any cont...
Definition: Particule.hpp:23
virtual void init()
init the particule
Definition: Particule.hpp:41