[2636] | 1 | |
---|
| 2 | |
---|
[4592] | 3 | /* |
---|
[2636] | 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 |
---|
[4592] | 15 | co-programmer: |
---|
[2636] | 16 | */ |
---|
| 17 | |
---|
| 18 | |
---|
| 19 | #include "story_entity.h" |
---|
| 20 | |
---|
| 21 | |
---|
| 22 | using namespace std; |
---|
| 23 | |
---|
| 24 | |
---|
| 25 | |
---|
[4592] | 26 | StoryEntity::StoryEntity () |
---|
| 27 | { |
---|
[4597] | 28 | this->setClassID(CL_STORY_ENTITY, "StoryEntity"); |
---|
[6153] | 29 | this->isInit = false; |
---|
| 30 | this->readyToRun = false; |
---|
| 31 | this->isPaused = false; |
---|
| 32 | this->isSuspended = false; |
---|
[4592] | 33 | } |
---|
[6153] | 34 | |
---|
[2636] | 35 | StoryEntity::~StoryEntity () {} |
---|
| 36 | |
---|
| 37 | |
---|
[4592] | 38 | /** |
---|
[4836] | 39 | * sets the story ID |
---|
[3221] | 40 | |
---|
[4592] | 41 | sets the story id of the current entity, this enables it to be identified in a |
---|
[3221] | 42 | global context. |
---|
| 43 | */ |
---|
[3220] | 44 | void StoryEntity::setStoryID(int storyID) |
---|
[2636] | 45 | { |
---|
| 46 | this->storyID = storyID; |
---|
| 47 | } |
---|
| 48 | |
---|
[3221] | 49 | |
---|
[4592] | 50 | /** |
---|
[4836] | 51 | * this reads the story id of the current entity |
---|
| 52 | * @returns the story entity id |
---|
[3221] | 53 | */ |
---|
[2636] | 54 | int StoryEntity::getStoryID() |
---|
| 55 | { |
---|
| 56 | return this->storyID; |
---|
| 57 | } |
---|
| 58 | |
---|
| 59 | |
---|
[4592] | 60 | /** |
---|
[4836] | 61 | * sets the id of the next story entity |
---|
[4592] | 62 | |
---|
[3221] | 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 | */ |
---|
[3220] | 67 | void StoryEntity::setNextStoryID(int nextStoryID) |
---|
[2636] | 68 | { |
---|
| 69 | this->nextStoryID = nextStoryID; |
---|
| 70 | } |
---|
| 71 | |
---|
[4592] | 72 | /** |
---|
[4836] | 73 | * gets the story id of the current entity |
---|
| 74 | * @returns story id |
---|
[3221] | 75 | */ |
---|
[3220] | 76 | int StoryEntity::getNextStoryID() |
---|
[2636] | 77 | { |
---|
| 78 | return this->nextStoryID; |
---|
| 79 | } |
---|