The Stroop Test Game
Ian Parberry's "Introduction to Game Physics"
Public Member Functions | Private Attributes | List of all members
CBubbleEngine Class Reference

A particle engine for bubbles. More...

#include <BubbleEngine.h>

Inheritance diagram for CBubbleEngine:

Public Member Functions

 CBubbleEngine (CVectorField *, LSpriteRenderer *)
 Constructor. More...
 
void step ()
 Animation step. More...
 

Private Attributes

CVectorFieldm_pVectorField = nullptr
 Pointer to a vector field.
 

Detailed Description

A particle engine for bubbles.

A particle engine with a vector field that is used to alter the speed of all particles. It is intended to be used for bubbles that are blown about by passing objects.

Constructor & Destructor Documentation

◆ CBubbleEngine()

CBubbleEngine::CBubbleEngine ( CVectorField pvf,
LSpriteRenderer *  pr 
)

Constructor.

Create a Bubble engine with its own vector field and PRNG.

Parameters
pvfPointer to a vector field.
prPointer to a sprite renderer.

Member Function Documentation

◆ step()

void CBubbleEngine::step ( )

Animation step.

Overrides CParticleEngine::step, adding deflection of particle velocity by a vector field.