#include <cMission.h>
Public Member Functions | |
virtual cObject * | init (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 |
Missions are responsible for initial and midtime spawning of objects (including the player object), tracking mission objectives (frags).
Future: support for timetriggers like onTime().
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.
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.