cMission Class Reference

#include <cMission.h>

Inheritance diagram for cMission:
cEmptyMission cTestMission

List of all members.

Public Member Functions

virtual cObjectinit (cWorld *world)=0
virtual void checkConditions ()
void onVictory ()
 Called when checkConditions() sees the victory condition(s) fullfilled.
void onDefeat ()
 Called when checkConditions() sees the defeat condition(s) fullfilled.

Protected Attributes

std::vector< cObject * > mVictory
std::vector< cObject * > mDefeat
int mState

Detailed Description

Missions are responsible for initial and midtime spawning of objects (including the player object), tracking mission objectives (frags).

Future: support for timetriggers like onTime().


Member Function Documentation

void cMission::checkConditions (  )  [virtual]

Through this method mission objectives can be traced. Victory (ANDed) and Defeat (ORed) Conditions are checked. onVictory or onDefeat are called accordingly. Enhance as desired.

virtual cObject* cMission::init ( cWorld world  )  [pure virtual]

Called with the world which needs to be populated by this mission. So this method should spawn objects into the world and setup other mission critical data of the derived mission.


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

Generated on Tue Feb 16 18:32:39 2010 for Linwarrior 3D by  doxygen 1.6.1