Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7464 in orxonox.OLD for trunk/src/util/singleplayer_shootemup.cc


Ignore:
Timestamp:
May 1, 2006, 4:52:33 PM (19 years ago)
Author:
patrick
Message:

orxonox: mission goals get checked now, verbose output.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/util/singleplayer_shootemup.cc

    r7462 r7464  
    2020#include "util/loading/factory.h"
    2121
    22 #include "render2D/billboard.h"
    23 #include "state.h"
    24 #include "class_list.h"
    25 
    26 #include "player.h"
    27 #include "playable.h"
    28 #include "space_ships/space_ship.h"
    29 
    30 
    31 #include "shared_network_data.h"
    32 #include "terrain.h"
    33 #include "class_list.h"
    34 #include "space_ships/space_ship.h"
     22#include "mission_goal.h"
    3523
    3624
     
    6755  GameRules::loadParams(root) ;
    6856
    69 //   LoadParam(root, "death-penalty-timeout", this, SingleplayerShootemup, setDeathPenaltyTimeout)
    70 //       .describe("sets the time in seconds a player has to wait for respawn");
    71 //
    72 //   LoadParam(root, "max-kills", this, SingleplayerShootemup, setMaxKills)
    73 //       .describe("sets the maximal kills for winning condition");
    74 //
    75 //   LoadParam(root, "death-screen-image", this, SingleplayerShootemup, setDeathScreen)
    76 //       .describe("sets the death screen image");
     57   LoadParam(root, "death-screen-image", this, SingleplayerShootemup, setDeathScreen)
     58       .describe("sets the death screen image");
    7759
    7860}
     
    10991void SingleplayerShootemup::tick(float dt)
    11092{
    111   this->checkGameRules();
     93  this->checkGameRules(dt);
    11294}
    11395
     
    123105 * check the game rules for consistency
    124106 */
    125 void SingleplayerShootemup::checkGameRules()
    126 {}
     107void SingleplayerShootemup::checkGameRules(float dt)
     108{
     109  PRINTF(0)("===========| Printing Mission State:\n");
     110  for (std::vector<MissionGoal*>::iterator it = this->missionList.begin(); it != this->missionList.end(); it++)
     111  {
     112    if( (*it)->checkMissionGoal(dt) != MS_ACCOMPLISHED)
     113    {
     114      PRINTF(0)("  Mission \"%s\" is not finished yet\n", (*it)->getMissionName().c_str());
     115    }
     116  }
     117}
    127118
    128119
Note: See TracChangeset for help on using the changeset viewer.