The Stroop Test Game
Game Physics with a 2D Physics Engine
Loading...
Searching...
No Matches
CBubbleEngine Class Reference

A particle engine for bubbles. More...

#include <BubbleEngine.h>

Inheritance diagram for CBubbleEngine:
Collaboration diagram for CBubbleEngine:

Public Member Functions

 CBubbleEngine (CVectorField *, Sage::CSpriteRenderer *)
 Constructor.
 
void Step ()
 Animation step.
 

Private Attributes

CVectorFieldm_pVectorField = nullptr
 Pointer to a vector field.
 

Detailed Description

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,
Sage::CSpriteRenderer * pr )

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 ( )

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

Here is the call graph for this function:
Here is the caller graph for this function: