-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathExplosionEmitter.h
More file actions
33 lines (30 loc) · 842 Bytes
/
ExplosionEmitter.h
File metadata and controls
33 lines (30 loc) · 842 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#pragma once
#include "Timeshift.h"
#include "global.h"
#define Explosion_DURATION 1.0f
class ExplosionEmitter {
public:
ExplosionEmitter();
~ExplosionEmitter();
void init();
void emitExplosion(Vector3 pos, Vector3 size);
void emitExplosion(Vector3 pos, Vector3 size, String explosionSound);
// void emitExplosion(Vector3 pos,Vector3 size,String explosionSound);
void init(String particle_file);
void upd(const Ogre::FrameEvent &evt);
bool isDispose() { return mDispose; }
void destroyEmitter() {
startemit = false;
SceneManager *mSceneMgr = global::getSingleton().getSceneManager();
if (bSys)
mSceneMgr->destroyParticleSystem(bSys);
if (bNode)
mSceneMgr->destroySceneNode(bNode);
}
private:
ParticleSystem *bSys;
SceneNode *bNode;
bool startemit;
bool mDispose;
Real timePos;
};