The Game Engine
1
Main Page
Related Pages
Classes
Files
File List
File Members
ParticleSystem.h
Go to the documentation of this file.
1
#ifndef __PARTICLE_SYSTEM_H__
2
#define __PARTICLE_SYSTEM_H__
3
#include <vector>
4
#include <string>
5
#include "
WorldObject.h
"
6
#include "
Actor.h
"
7
#include "
CollisionObject.h
"
8
#include "
Sprite.h
"
9
#include "
Color.h
"
10
#include <list>
11
18
class
ParticleSystem
:
public
WorldObject
19
{
20
public
:
21
30
class
Particle
31
{
32
public
:
33
Particle
();
34
36
ParticleSystem
*
Parent
;
37
39
Point2D
Position
;
40
42
Point2D
Velocity
;
43
45
float
Size
;
46
48
Color
Color
;
49
51
int
Life
;
52
};
53
66
ParticleSystem
(
string
name,
Point2D
position,
Texture
tex, vector<CollisionObject*> collisionBounds = vector<CollisionObject*>());
67
68
~ParticleSystem
();
69
100
Behavior
ParticleInit
;
101
134
Behavior
ParticleUpdate
;
135
149
bool
CollisionEnabled
;
150
151
166
int
CollisionList
;
167
184
void
SetTexture
(
Actor
actor,
int
animation,
int
frame);
185
196
void
SetTexture
(
SpriteFrame
* frame);
197
209
void
SpawnParticles
(
int
numparticles);
210
214
virtual
void
draw
();
215
219
virtual
void
drawCollisions
();
220
224
void
update
();
225
229
virtual
void
runBehavior
();
230
234
vector<Sprite*>
collisionWithSprites
(
string
name,
int
count = -1);
235
239
vector<CollisionObject*>&
getCollisionData
();
240
244
Point2D
getBasePos
();
245
249
Point2D
getCenterPos
();
250
254
virtual
WorldObjectType
getType
();
255
protected
:
257
list<Particle*>
mParticles
;
258
260
CollisionRectangle
mBoundingBox
;
261
263
vector<CollisionObject*>
mCollisionData
;
264
266
Texture
mTexture
;
267
};
268
#endif
ParticleSystem.h
Generated on Tue Apr 16 2013 02:32:41 for The Game Engine by
1.8.3.1