Jamie Slowgrove - MGP Assignment 2 - JAM
 All Classes Namespaces Files Functions Variables Macros
Public Member Functions | Private Attributes | List of all members
ForceField Class Reference

Creates a ForceField object that inherits Entity. More...

#include <ForceField.h>

Inheritance diagram for ForceField:
Inheritance graph
Collaboration diagram for ForceField:
Collaboration graph

Public Member Functions

 ForceField (JAM_Texture *sprite, float x, float y, float width, float height, float velocity, float screenWidth, float screenHeight)
 
 ~ForceField ()
 
void update (float dt)
 
- Public Member Functions inherited from JAM_Entity
 JAM_Entity (JAM_Texture *sprite, float x, float y, float width, float height)
 
 ~JAM_Entity ()
 
void draw (SDL_Renderer *renderer)
 
void setPosition (float x, float y)
 
void setPosition (JAM_Vec2 position)
 
void setX (float x)
 
void setY (float y)
 
void setDimensions (float width, float height)
 
void setDimensions (JAM_Vec2 dimensions)
 
void setWidth (float width)
 
void setHeight (float height)
 
JAM_Vec2 getPosition ()
 
JAM_Vec2 getDimensions ()
 

Private Attributes

float velocity
 
float screenWidth
 
float screenHeight
 

Detailed Description

Creates a ForceField object that inherits Entity.

Author
Jamie Slowgrove

Constructor & Destructor Documentation

ForceField::ForceField ( JAM_Texture sprite,
float  x,
float  y,
float  width,
float  height,
float  velocity,
float  screenWidth,
float  screenHeight 
)

Constructs the ForceField object.

Parameters
spriteA pointer to the objects Texture.
xThe x position of the ForceField.
yThe y position of the ForceField.
widthThe width of the ForceField.
heightThe height of the ForceField.
velocityThe velocity of the ForceField.
screenWidthThe width of the screen.
screenHeightThe height of the screen.
ForceField::~ForceField ( )

Destructs the ForceField object.

Member Function Documentation

void ForceField::update ( float  dt)
virtual

A function that updates the ForceField.

Parameters
dtThe delta time.

Implements JAM_Entity.

Here is the call graph for this function:

Member Data Documentation

float ForceField::screenHeight
private

The height of the screen.

float ForceField::screenWidth
private

The width of the screen.

float ForceField::velocity
private

The velocity of the ForceField.


The documentation for this class was generated from the following files: