Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6424 in orxonox.OLD for trunk/src/story_entities/story_entity.cc


Ignore:
Timestamp:
Jan 7, 2006, 11:07:22 PM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: merged the branche network back to the trunk
merged with command:
svn merge https://svn.orxonox.net/orxonox/branches/network . -r 6351:HEAD
no conflicts

File:
1 edited

Legend:

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

    r6153 r6424  
    1717
    1818
     19#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD
     20
     21
    1922#include "story_entity.h"
     23
     24#include "load_param.h"
    2025
    2126
     
    2328
    2429
    25 
     30/**
     31 *  default constructor initializes all needed data
     32 */
    2633StoryEntity::StoryEntity ()
    2734{
    2835  this->setClassID(CL_STORY_ENTITY, "StoryEntity");
     36
    2937  this->isInit = false;
    30   this->readyToRun = false;
    3138  this->isPaused = false;
    32   this->isSuspended = false;
    33 }
     39  this->isRunning = false;
    3440
    35 StoryEntity::~StoryEntity () {}
    36 
    37 
    38 /**
    39   *  sets the story ID
    40 
    41     sets the story id of the current entity, this enables it to be identified in a
    42     global context.
    43 */
    44 void StoryEntity::setStoryID(int storyID)
    45 {
    46   this->storyID = storyID;
     41  this->storyID = -1;
     42  this->nextStoryID = WORLD_ID_GAMEEND;
    4743}
    4844
    4945
    5046/**
    51   *  this reads the story id of the current entity
    52   * @returns the story entity id
    53 */
    54 int StoryEntity::getStoryID()
    55 {
    56   return this->storyID;
    57 }
     47 *  deconstructor
     48 */
     49StoryEntity::~StoryEntity ()
     50{}
    5851
    5952
    6053/**
    61   *  sets the id of the next story entity
     54 *  loads the Parameters of a Campaign
     55 * @param root: The XML-element to load from
     56 */
     57void StoryEntity::loadParams(const TiXmlElement* root)
     58{
     59  static_cast<BaseObject*>(this)->loadParams(root);
    6260
    63     StoryEntities can choose their following entity themselfs. the entity id defined here
    64     will be startet after this entity ends. this can be convenient if you want to have a
    65     non linear story with switches.
    66 */
    67 void StoryEntity::setNextStoryID(int nextStoryID)
    68 {
    69   this->nextStoryID = nextStoryID;
     61  LoadParam(root, "identifier", this, StoryEntity, setStoryID)
     62      .describe("A Unique Identifier for this StoryEntity");
     63
     64  LoadParam(root, "nextid", this, StoryEntity, setNextStoryID)
     65      .describe("Sets the ID of the next StoryEntity");
     66
     67  PRINTF(4)("Loaded StoryEntity specific stuff\n");
    7068}
    71 
    72 /**
    73   *  gets the story id of the current entity
    74   * @returns story id
    75 */
    76 int StoryEntity::getNextStoryID()
    77 {
    78   return this->nextStoryID;
    79 }
Note: See TracChangeset for help on using the changeset viewer.