Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3459 in orxonox.OLD for orxonox/trunk/src/campaign.cc


Ignore:
Timestamp:
Mar 9, 2005, 1:00:30 AM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: cleaning up old stuff in world.cc and its relatives. first step…

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/campaign.cc

    r3231 r3459  
    3939}
    4040
    41 /**
    42     \brief adds an game stroy entity to the campaign
    43 
    44     \param se: The entity
    45     \param storyID: The number that identifies the entity in the campaign. Each ID only used once in a Campaign
    46 
    47     An entity can be a world (playable), a cinematic, a shop, sounds, whatever you
    48     want to queue up in the campaign.
    49 */
    50 void Campaign::addEntity(StoryEntity* se, int storyID)
    51 {
    52   se->setStoryID(storyID);
    53   this->addEntity(se);
    54 }
    55 
    56 void Campaign::addEntity(StoryEntity* se)
    57 {
    58   this->entities->add(se);
    59 }
    60 
    61 
    62 void Campaign::removeEntity(int storyID)
    63 {
    64   this->removeEntity(this->getStoryEntity(storyID));
    65  
    66 }
    67 
    68 
    69 void Campaign::removeEntity(StoryEntity* se)
    70 {
    71   this->entities->remove(se);
    72 }
    73 
    7441
    7542ErrorMessage Campaign::start()
     
    7744  this->start(0);
    7845}
     46
    7947
    8048ErrorMessage Campaign::start(int storyID = 0)
     
    11381}
    11482
     83
     84ErrorMessage Campaign::pause()
     85{
     86  if(this->currentEntity != NULL)
     87    this->isPaused = true;
     88}
     89
     90
     91ErrorMessage Campaign::resume()
     92{
     93  if(this->currentEntity != NULL)
     94    this->isPaused = false;
     95}
     96
     97
    11598ErrorMessage Campaign::stop()
    11699{
     
    124107}
    125108
    126 ErrorMessage Campaign::pause()
    127 {
    128   if(this->currentEntity != NULL)
    129     this->isPaused = true;
    130 }
    131 
    132 
    133 ErrorMessage Campaign::resume()
    134 {
    135   if(this->currentEntity != NULL)
    136     this->isPaused = false;
    137 }
    138 
    139 
    140 void Campaign::destroy()
     109
     110ErrorMessage Campaign::destroy()
    141111{
    142112  if(this->currentEntity != NULL)
     
    147117    }
    148118}
     119
     120
     121/**
     122    \brief adds an game stroy entity to the campaign
     123
     124    \param se: The entity
     125    \param storyID: The number that identifies the entity in the campaign. Each ID only used once in a Campaign
     126
     127    An entity can be a world (playable), a cinematic, a shop, sounds, whatever you
     128    want to queue up in the campaign.
     129*/
     130void Campaign::addEntity(StoryEntity* se, int storyID)
     131{
     132  se->setStoryID(storyID);
     133  this->addEntity(se);
     134}
     135
     136void Campaign::addEntity(StoryEntity* se)
     137{
     138  this->entities->add(se);
     139}
     140
     141
     142void Campaign::removeEntity(int storyID)
     143{
     144  this->removeEntity(this->getStoryEntity(storyID));
     145 
     146}
     147
     148
     149void Campaign::removeEntity(StoryEntity* se)
     150{
     151  this->entities->remove(se);
     152}
     153
    149154
    150155/*
Note: See TracChangeset for help on using the changeset viewer.