Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/network/src/story_entities/story_entity.cc @ 6376

Last change on this file since 6376 was 6376, checked in by patrick, 18 years ago

network: load param is now processed correctly

File size: 1.3 KB
Line 
1
2
3/*
4   orxonox - the future of 3D-vertical-scrollers
5
6   Copyright (C) 2004 orx
7
8   This program is free software; you can redistribute it and/or modify
9   it under the terms of the GNU General Public License as published by
10   the Free Software Foundation; either version 2, or (at your option)
11   any later version.
12
13   ### File Specific:
14   main-programmer: Patrick Boenzli
15   co-programmer:
16*/
17
18
19#include "story_entity.h"
20
21#include "load_param.h"
22
23using namespace std;
24
25
26/**
27 *  default constructor initializes all needed data
28 */
29StoryEntity::StoryEntity ()
30{
31  this->setClassID(CL_STORY_ENTITY, "StoryEntity");
32
33  this->isInit = false;
34  this->readyToRun = false;
35  this->isPaused = false;
36  this->isSuspended = false;
37
38  this->storyID = -1;
39  this->nextStoryID = WORLD_ID_GAMEEND;
40}
41
42
43/**
44 *  deconstructor
45 */
46StoryEntity::~StoryEntity ()
47{}
48
49
50/**
51 *  loads the Parameters of a Campaign
52 * @param root: The XML-element to load from
53 */
54void StoryEntity::loadParams(const TiXmlElement* root)
55{
56  static_cast<BaseObject*>(this)->loadParams(root);
57
58  LoadParam(root, "identifier", this, StoryEntity, setStoryID)
59      .describe("A Unique Identifier for this StoryEntity");
60
61  LoadParam(root, "nextid", this, StoryEntity, setNextStoryID)
62      .describe("Sets the ID of the next StoryEntity");
63
64  PRINTF(4)("Loaded StoryEntity specific stuff\n");
65}
Note: See TracBrowser for help on using the repository browser.