Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6153 in orxonox.OLD


Ignore:
Timestamp:
Dec 17, 2005, 7:05:52 PM (18 years ago)
Author:
bensch
Message:

docu

Location:
trunk/src/story_entities
Files:
3 edited

Legend:

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

    r6152 r6153  
    121121      se->postLoad();
    122122
     123      se->init();
    123124      se->preStart();
    124125      se->start();
  • trunk/src/story_entities/story_entity.cc

    r6152 r6153  
    2727{
    2828  this->setClassID(CL_STORY_ENTITY, "StoryEntity");
     29  this->isInit = false;
     30  this->readyToRun = false;
     31  this->isPaused = false;
     32  this->isSuspended = false;
    2933}
     34
    3035StoryEntity::~StoryEntity () {}
    3136
  • trunk/src/story_entities/story_entity.h

    r6152 r6153  
    1919  virtual ~StoryEntity ();
    2020
    21 
    2221  // INIT AND LOAD //
     22  /** @brief initializes a Story Entity to default Values */
     23  virtual ErrorMessage init() {};
     24  /** @brief called before loading */
    2325  virtual ErrorMessage preLoad() {};
     26  /** @brief called to load. */
    2427  virtual ErrorMessage load() {};
     28  /** @brief called right after loading */
    2529  virtual ErrorMessage postLoad() {};
     30  /** @brief called after postload to check for integrity. (optional) */
    2631  virtual ErrorMessage check() {};
    2732
    2833  // RUNNING //
     34  /** @brief called shortly before starting the Entity */
    2935  virtual ErrorMessage preStart() {};
     36  /** @brief starts the Entity. Starts the main cycle */
    3037  virtual ErrorMessage start() = 0;
     38  /** @brief pauses the Entity. call to resume required to get it running again */
    3139  virtual ErrorMessage pause() = 0;
     40  /** @brief resumes the Entity after a stop/pause or suspend. */
     41  virtual ErrorMessage resume() = 0;
     42  /** @brief suspends the Entity detaches all mayor functions  (optional) */
     43  virtual ErrorMessage suspend() {};
     44  /** @brief rewinds to the beginning/last checkpoint */
    3245  virtual ErrorMessage rewind() {};
    33   virtual ErrorMessage suspend() {};
    34   virtual ErrorMessage resume() = 0;
     46  /** @brief leaves the Entity. Ends it */
     47  virtual ErrorMessage preStop() {};
     48  /** @brief Stops the entity. */
    3549  virtual ErrorMessage stop() = 0;
     50
     51  // KILLING
     52  /** @brief kills the Entity. should also calls prestop stop */
    3653  virtual ErrorMessage destroy() {};
    3754
     
    4966
    5067 private:
    51   int storyID;           //!< this is the number of this entity, identifying it in a list/tree...
    52   int nextStoryID;       //!< if this entity has finished, this entity shall be called
     68    int storyID;           //!< this is the number of this entity, identifying it in a list/tree...
     69    int nextStoryID;       //!< if this entity has finished, this entity shall be called
    5370};
    5471
Note: See TracChangeset for help on using the changeset viewer.