Box2D Cannon Game with Stars
Chapter 8 of Ian Parberry's "Introduction to Game Physics with Box2D"
|
The particle object. More...
#include <Particle.h>
Public Member Functions | |
CParticle (GameObjectType t) | |
Constructor. | |
void | Set (D3DXVECTOR2 p, int lifetime, float magnify) |
Set particle parameters. | |
Public Member Functions inherited from CGameObject | |
CGameObject (GameObjectType objecttype) | |
Constructor. | |
~CGameObject () | |
Destructor. | |
void | SetPhysicsBody (b2Body *b) |
Set pointer to physics world body. | |
Protected Attributes | |
D3DXVECTOR2 | m_vLocation |
Current location. | |
float | m_fAngle |
Current orientation. | |
int | m_nBirthTime |
Time of creation. | |
int | m_nLifeSpan |
Time it will live for. | |
float | m_fMagnification |
Maximum size multiplier. | |
Protected Attributes inherited from CGameObject | |
GameObjectType | m_nObjectType |
Object type. | |
b2Body * | m_pBody |
Physics World body. | |
Friends | |
class | CObjectManager |
class | CParticleEngine |
class | CRenderWorld |
The particle object.
CParticle::CParticle | ( | GameObjectType | t | ) |
Constructor.
Constructor.
t | Object type. |
void CParticle::Set | ( | D3DXVECTOR2 | p, |
int | lifetime, | ||
float | magnify | ||
) |
Set particle parameters.
Set particle-related parameter values.
p | Location in Render World. |
lifetime | Expected lifetime. |
magnify | Maximum size multiplier. |