Caseus Tower
 All Classes Namespaces Files Functions Variables
Animation Class Reference

Creates an Animation object Creates an Animation object to handle the timing of when an Animation should run. DISCLAMER - This is the animation class that I used in my PGG SDL assignment. More...

#include <animation.h>

Public Member Functions

 Animation (float)
 
 ~Animation ()
 
void updateTimer (float dt)
 
float getCurrentTime ()
 

Private Attributes

float currentTime
 
float duration
 

Detailed Description

Creates an Animation object Creates an Animation object to handle the timing of when an Animation should run. DISCLAMER - This is the animation class that I used in my PGG SDL assignment.

Definition at line 8 of file animation.h.

Constructor & Destructor Documentation

Animation::Animation ( float  )

Constructs a Animation object

Parameters
floatthe wanted duration of the Animation
Animation::~Animation ( )

A destructor for the Animation object

Member Function Documentation

float Animation::getCurrentTime ( )

Getter # returns the current time.

Returns
float the current time
void Animation::updateTimer ( float  dt)

A timer for Animation The timer is updated with the current time and resets to 0 when the time is the duration.

Parameters
floatthe delta time

Member Data Documentation

float Animation::currentTime
private

The current time of the Animation timer

Definition at line 12 of file animation.h.

float Animation::duration
private

The duration of the Animation timer

Definition at line 14 of file animation.h.


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