C#Code
C#Code
Public Member Functions | Protected Attributes
Libraries.Timers.BaseFrameTimer Class Reference
Inheritance diagram for Libraries.Timers.BaseFrameTimer:
Libraries.Timers.ListFrameTimer Libraries.Timers.ListFrameTimer

List of all members.

Public Member Functions

 BaseFrameTimer ()
void Start ()
abstract void Update (UInt32 timePassed)
bool IsFinished ()
void SetPause (bool pause)
bool GetIsPaused ()
void SetLoops (bool loop)
abstract int GetNumFrames ()
abstract object GetCurrFrameData ()
virtual bool SetToFrame (int frameInd)
bool GetHasStarted ()
 BaseFrameTimer ()
void Start ()
abstract void Update (UInt32 timePassed)
bool IsFinished ()
void SetPause (bool pause)
bool GetIsPaused ()
void SetLoops (bool loop)
abstract int GetNumFrames ()
abstract object GetCurrFrameData ()
virtual bool SetToFrame (int frameInd)
bool GetHasStarted ()

Protected Attributes

bool m_paused
 True if the timer is paused, false if not.
bool m_loop
 True if the timer should loop, false if not. If set to loop, the timer never finishes.
int m_currFrame
 Current frame index.
bool m_isFinished
 wether the animation is finished. Value is true if it is, false if not.
UInt32 m_timeLeft
 Time left over from the previous update. Add the new time to this and keep stubtracting the frame times from it till there isn't enough time to end a frame.
bool m_started
 True if the timer was ever started, false if not.

Detailed Description

A basic frame timer. You can set how long frames last and object data they contain. It updates which frame is the current frame, lets you start at a specific frame or time.


Constructor & Destructor Documentation

Libraries.Timers.BaseFrameTimer.BaseFrameTimer ( )

Default constructor.

Libraries.Timers.BaseFrameTimer.BaseFrameTimer ( )

Default constructor.


Member Function Documentation

abstract object Libraries.Timers.BaseFrameTimer.GetCurrFrameData ( ) [pure virtual]

Retrive the object stored in the frame data for the current frame.

Return:
Value is the object if the current frame is valid, null if not.

Implemented in Libraries.Timers.ListFrameTimer, and Libraries.Timers.ListFrameTimer.

abstract object Libraries.Timers.BaseFrameTimer.GetCurrFrameData ( ) [pure virtual]

Retrive the object stored in the frame data for the current frame.

Return:
Value is the object if the current frame is valid, null if not.

Implemented in Libraries.Timers.ListFrameTimer, and Libraries.Timers.ListFrameTimer.

bool Libraries.Timers.BaseFrameTimer.GetHasStarted ( )

Get wether the timer was ever started. Value is true if it was, false if not.

Return:
Value is true if the timer was ever started, false if not.

bool Libraries.Timers.BaseFrameTimer.GetHasStarted ( )

Get wether the timer was ever started. Value is true if it was, false if not.

Return:
Value is true if the timer was ever started, false if not.

bool Libraries.Timers.BaseFrameTimer.GetIsPaused ( )

Get wether the timer is paused.

Return:
Value is true if the timer is paused, false if not.

bool Libraries.Timers.BaseFrameTimer.GetIsPaused ( )

Get wether the timer is paused.

Return:
Value is true if the timer is paused, false if not.

abstract int Libraries.Timers.BaseFrameTimer.GetNumFrames ( ) [pure virtual]

Get how many frames are in the timer.

Return:
Value is the number of frames.

Implemented in Libraries.Timers.ListFrameTimer, and Libraries.Timers.ListFrameTimer.

abstract int Libraries.Timers.BaseFrameTimer.GetNumFrames ( ) [pure virtual]

Get how many frames are in the timer.

Return:
Value is the number of frames.

Implemented in Libraries.Timers.ListFrameTimer, and Libraries.Timers.ListFrameTimer.

bool Libraries.Timers.BaseFrameTimer.IsFinished ( )

Get wether the frame timer has finished.

Return:
Value is true if the frame timer is finished, false if not.

bool Libraries.Timers.BaseFrameTimer.IsFinished ( )

Get wether the frame timer has finished.

Return:
Value is true if the frame timer is finished, false if not.

void Libraries.Timers.BaseFrameTimer.SetLoops ( bool  loop)

Set wether the timer loops. If the timer was finished and looping gets turned on, finished flag gets cleared.

loop - True if the timer should loop, false if not.
void Libraries.Timers.BaseFrameTimer.SetLoops ( bool  loop)

Set wether the timer loops. If the timer was finished and looping gets turned on, finished flag gets cleared.

loop - True if the timer should loop, false if not.
void Libraries.Timers.BaseFrameTimer.SetPause ( bool  pause)

Set wether the timer is paused.

pause - True if the timer should be paused, false if not.
void Libraries.Timers.BaseFrameTimer.SetPause ( bool  pause)

Set wether the timer is paused.

pause - True if the timer should be paused, false if not.
virtual bool Libraries.Timers.BaseFrameTimer.SetToFrame ( int  frameInd) [virtual]

Set the timer to be at the given frame, if possible.

frameInd - Frame index to be at.

Return:
Value is true if the current frame could be changed to the given frame, false if not.
virtual bool Libraries.Timers.BaseFrameTimer.SetToFrame ( int  frameInd) [virtual]

Set the timer to be at the given frame, if possible.

frameInd - Frame index to be at.

Return:
Value is true if the current frame could be changed to the given frame, false if not.
void Libraries.Timers.BaseFrameTimer.Start ( )

Start the timer. Resets to the beginning frame.

void Libraries.Timers.BaseFrameTimer.Start ( )

Start the timer. Resets to the beginning frame.

abstract void Libraries.Timers.BaseFrameTimer.Update ( UInt32  timePassed) [pure virtual]

Update the frame timer.

timePassed - How much time has passed to use for the update.

Implemented in Libraries.Timers.ListFrameTimer, and Libraries.Timers.ListFrameTimer.

abstract void Libraries.Timers.BaseFrameTimer.Update ( UInt32  timePassed) [pure virtual]

Update the frame timer.

timePassed - How much time has passed to use for the update.

Implemented in Libraries.Timers.ListFrameTimer, and Libraries.Timers.ListFrameTimer.


Member Data Documentation

Current frame index.

wether the animation is finished. Value is true if it is, false if not.

True if the timer should loop, false if not. If set to loop, the timer never finishes.

True if the timer is paused, false if not.

True if the timer was ever started, false if not.

Time left over from the previous update. Add the new time to this and keep stubtracting the frame times from it till there isn't enough time to end a frame.


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