Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/story_entities/story_entity.h @ 6152

Last change on this file since 6152 was 6152, checked in by bensch, 18 years ago

orxonox/trunk: some work in the loading process of worlds

File size: 1.5 KB
Line 
1/*!
2 * @file story_entity.h
3  *  holds the base class of everything that is playable - that is part of the story
4*/
5
6
7#ifndef _STORY_ENTITY_H
8#define _STORY_ENTITY_H
9
10#include "base_object.h"
11#include "story_def.h"
12#include "error.h"
13
14//! A class that represents something to play in orxonox. it is a container for worlds, movies, mission briefings, etc...
15class StoryEntity : public BaseObject {
16
17 public:
18  StoryEntity ();
19  virtual ~StoryEntity ();
20
21
22  // INIT AND LOAD //
23  virtual ErrorMessage preLoad() {};
24  virtual ErrorMessage load() {};
25  virtual ErrorMessage postLoad() {};
26  virtual ErrorMessage check() {};
27
28  // RUNNING //
29  virtual ErrorMessage preStart() {};
30  virtual ErrorMessage start() = 0;
31  virtual ErrorMessage pause() = 0;
32  virtual ErrorMessage rewind() {};
33  virtual ErrorMessage suspend() {};
34  virtual ErrorMessage resume() = 0;
35  virtual ErrorMessage stop() = 0;
36  virtual ErrorMessage destroy() {};
37
38  void setStoryID(int storyID);
39  int getStoryID();
40
41  void setNextStoryID(int nextStoryID);
42  int getNextStoryID();
43
44  protected:
45    bool isInit;         //!< if the entity is initialized, this has to be true.
46    bool readyToRun;     //!< If the entity is ready to run -> post-check.
47    bool isPaused;       //!< is true if the entity is paused
48    bool isSuspended;    //!< if the Entity is suspended.
49
50 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
53};
54
55#endif /* _STORY_ENTITY_H */
Note: See TracBrowser for help on using the repository browser.