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

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

#include <Background.h>

Inheritance diagram for Background:
Inheritance graph
Collaboration diagram for Background:
Collaboration graph

Public Member Functions

 Background (JAM_Texture *sprite, float x, float y, float width, float height, float velocity)
 
 ~Background ()
 
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
 

Detailed Description

Creates a Background object that inherits Entity.

Author
Jamie Slowgrove

Constructor & Destructor Documentation

Background::Background ( JAM_Texture sprite,
float  x,
float  y,
float  width,
float  height,
float  velocity 
)

Constructs the Background object.

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

Destructs the Background object.

Member Function Documentation

void Background::update ( float  dt)
virtual

A function that updates the Background.

Parameters
dtThe delta time.

Implements JAM_Entity.

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

float Background::velocity
private

The velocity of the Background.


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