MiniShock Class Reference

#include <MiniShock.h>

Collaboration diagram for MiniShock:

Collaboration graph
[legend]
List of all members.

Detailed Description

This class represents a small 2D shockwave effect, radiating outward from it's creation position. It can be thought of as a 2D special effect overlay, and does not affect the geometry or game objects in any way.

Definition at line 31 of file MiniShock.h.

Public Member Functions

 MiniShock (void)
 default constructor
 MiniShock (Vector vPos, float energy)
 general constructor
 ~MiniShock (void)
 remove the effect
void Draw (void)
 draws the effect in it's current state
bool Step (float timeStep)
 advance the state of the effect
void SetColor (float r, float g, float b)
 set the color used to draw the effect

Public Attributes

Vector vPosition
 absolute position of the effect's origin
float fEnergy
 energy of the wave (relates to lifespan)
float fDecayRate
 rate at which wave loses energy
float fAge
 how long the wave has been around
float fColorR
 red color component
float fColorG
 green color component
float fColorB
 blue color component


Constructor & Destructor Documentation

MiniShock::MiniShock ( void   ) 

Definition at line 26 of file MiniShock.cpp.

References fAge, fColorB, fColorG, fColorR, fEnergy, vPosition, and Vector::x.

MiniShock::MiniShock ( Vector  vPos,
float  energy 
)

Definition at line 37 of file MiniShock.cpp.

References fAge, fColorB, fColorG, fColorR, fEnergy, and vPosition.

MiniShock::~MiniShock ( void   ) 

Definition at line 48 of file MiniShock.cpp.


Member Function Documentation

void MiniShock::Draw ( void   ) 

Definition at line 52 of file MiniShock.cpp.

References DrawCircle(), fAge, fColorB, fColorG, fColorR, fEnergy, vPosition, Vector::x, and Vector::y.

Referenced by CEffect::Draw().

Here is the call graph for this function:

Here is the caller graph for this function:

bool MiniShock::Step ( float  timeStep  ) 

Definition at line 72 of file MiniShock.cpp.

References fAge, and fEnergy.

Referenced by CEffect::Step().

Here is the caller graph for this function:

void MiniShock::SetColor ( float  r,
float  g,
float  b 
)

Set the color of the effect, with individual intensity values for red, green, and blue color components.

Definition at line 90 of file MiniShock.cpp.

References fColorB, fColorG, and fColorR.

Referenced by PhysicsReflect(), and RemoveDeadObjects().

Here is the caller graph for this function:


Member Data Documentation

Vector MiniShock::vPosition

Definition at line 34 of file MiniShock.h.

Referenced by Draw(), and MiniShock().

float MiniShock::fEnergy

Definition at line 35 of file MiniShock.h.

Referenced by Draw(), MiniShock(), and Step().

float MiniShock::fDecayRate

Definition at line 36 of file MiniShock.h.

float MiniShock::fAge

Definition at line 37 of file MiniShock.h.

Referenced by Draw(), MiniShock(), and Step().

float MiniShock::fColorR

Definition at line 38 of file MiniShock.h.

Referenced by Draw(), MiniShock(), and SetColor().

float MiniShock::fColorG

Definition at line 39 of file MiniShock.h.

Referenced by Draw(), MiniShock(), and SetColor().

float MiniShock::fColorB

Definition at line 40 of file MiniShock.h.

Referenced by Draw(), MiniShock(), and SetColor().

 

Copyright Windsor Schmidt 2006 - All rights reserved.