DustyEngine::CountDownTask Class Reference

CountDownTask counts down from a certain task. It can be set to count past zero, but by default it stops at zero. More...

#include <dustycountdowntask.h>

Inheritance diagram for DustyEngine::CountDownTask:

DustyEngine::CounterTask DustyEngine::DummyTask DustyEngine::Task List of all members.

Public Member Functions

 CountDownTask ()
 ~CountDownTask ()
bool IsZero ()
void SetCountPastZero (bool countPast)
bool DoesCountPastZero ()
void OnUpdate ()
 OnUpdate() is called by the TaskTree when the time has come to execute the task's code.

Protected Attributes

bool countPastZero

Detailed Description

CountDownTask counts down from a certain task. It can be set to count past zero, but by default it stops at zero.

Definition at line 11 of file dustycountdowntask.h.


Constructor & Destructor Documentation

DustyEngine::CountDownTask::CountDownTask  ) 
 

DustyEngine::CountDownTask::~CountDownTask  ) 
 


Member Function Documentation

bool DustyEngine::CountDownTask::DoesCountPastZero  )  [inline]
 

DoesCountPastZero() returns whether or not the task counts into negatives past zero.

Returns:
Returns true if the counter will count past zero, and false if not.

Definition at line 34 of file dustycountdowntask.h.

bool DustyEngine::CountDownTask::IsZero  )  [inline]
 

IsZero() returns true if the counter has reached zero.

Returns:
Returns true if the counter is 0, and false if not.

Definition at line 20 of file dustycountdowntask.h.

void DustyEngine::CountDownTask::OnUpdate  )  [virtual]
 

OnUpdate() is called by the TaskTree when the time has come to execute the task's code.

OnUpdate is typically the most important function. OnUpdate is only called when enough time has passed or every frame, depending upon what the priority of the task is. If you want code to execute on a time-based basis, put that code here and add the task to the tree.

Reimplemented from DustyEngine::CounterTask.

void DustyEngine::CountDownTask::SetCountPastZero bool  countPast  )  [inline]
 

SetCountPastZero sets whether this task should continue counting down into negatives after it reaches zero.

Parameters:
countPast,: If countPast is true, the task will continue counting past zero. If its false, it will stop at zero.

Definition at line 27 of file dustycountdowntask.h.


Member Data Documentation

bool DustyEngine::CountDownTask::countPastZero [protected]
 

Definition at line 42 of file dustycountdowntask.h.


The documentation for this class was generated from the following file:
Generated on Fri Jan 27 17:31:54 2006 for Dusty Engine by  doxygen 1.4.6-NO