Public Member Functions | Protected Attributes | Static Protected Attributes

Background Class Reference

Background for all game screens. More...

#include <Background.h>

List of all members.

Public Member Functions

 Background (CIwFVec2 screenDimensions)
 ~Background ()
void Update (double deltaTime)
void Draw ()

Protected Attributes

CIw2DImage * m_hillsImage
 Image for the hills.
CIw2DImage * m_cloudsImage
 Image for the clouds.
CIwFVec2 m_screenDimensions
 Pixel dimensions of the screen.
CIwFVec2 m_cloudPos
 Position of the clouds.
float m_cloudSpeed
 Scrolling speed for the clouds.

Static Protected Attributes

static const int m_cloudY = 100
 Fixed Y position for the clouds.

Detailed Description

Background for all game screens.

Background with hills and scrolling clouds.


Constructor & Destructor Documentation

Background::Background ( CIwFVec2  screenDimensions  ) 

Constructor.

Create a new background.

Parameters:
[in] screenDimensions Width and height of the screen in pixels.
Background::~Background (  ) 

Destructor.

Destroy the background and free any associated memory.


Member Function Documentation

void Background::Draw (  ) 

Draw background.

Draws the hills and clouds.

void Background::Update ( double  deltaTime  ) 

Update background.

Scrolls the clouds across the sky.

Parameters:
[in] deltaTime Time since the last update.

The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations