-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathBulletHitManager.h
More file actions
38 lines (33 loc) · 887 Bytes
/
BulletHitManager.h
File metadata and controls
38 lines (33 loc) · 887 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
34
35
36
37
38
#pragma once
#include "Manager_Template.h"
#include "Ogre.h"
#include "Timeshift.h"
using namespace Ogre;
using namespace std;
class BulletHit {
public:
BulletHit(Vector3 pos);
BulletHit(Vector3 pos, Real m);
BulletHit(Vector3 pos, String templName);
BulletHit(Vector3 pos, Real m, String f);
~BulletHit();
void start();
void stopAndKill();
private:
ParticleSystem *bSys;
SceneNode *bNode;
};
class BulletHitManager : public Singleton<BulletHitManager>,
public managerTemplate {
public:
BulletHitManager();
~BulletHitManager();
virtual void init();
void addBulletEffect(Vector3 pos, Real sec);
void addBulletEffect(Vector3 pos, Real sec, Real m);
void addBulletEffect(Vector3 pos, Real sec, Real m, String f);
virtual void upd(const FrameEvent &evt);
virtual void cleanup();
private:
map<BulletHit *, Real> bullethits;
};