Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/network/src/story_entities/campaign.h @ 6389

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

network: much more work on the StoryEntity functions and reimplementations of the DataTanks of each StoryEntity

File size: 1.5 KB
Line 
1/*!
2 * @file campaign.h
3 * definition of the campaign
4 */
5
6#ifndef _CAMPAIGN_H
7#define _CAMPAIGN_H
8
9
10#include "story_entity.h"
11#include <list>
12
13
14class TiXmlElement;
15class CampaignData;
16
17
18//! A class that represents a game Campaign that contains other StoryEntities like GameWorlds, movies, etc.
19class Campaign : public StoryEntity
20{
21
22  public:
23    Campaign( TiXmlElement* root);
24    virtual ~Campaign ();
25
26    void loadParams(const TiXmlElement* root);
27
28    virtual bool start();
29    virtual bool stop();
30    virtual bool pause();
31    virtual bool resume();
32    virtual void run();
33
34    void switchToNextLevel();
35
36
37  private:
38    StoryEntity*                        currentEntity;          //!< reference to the current StoryEntity
39    CampaignData*                       campaignData;           //!< reference to the CampaignData
40};
41
42
43
44//! A class that contains the data of the Campaign object
45class CampaignData : public BaseObject
46{
47
48  public:
49    CampaignData(const TiXmlElement* root);
50    virtual ~CampaignData();
51
52    void loadParams(const TiXmlElement* root);
53
54    void addStoryEntity(StoryEntity* se);
55
56    StoryEntity* getFirstLevel();
57    StoryEntity* getNextLevel();
58
59
60  private:
61    void loadParamsWorldList(const TiXmlElement* root);
62
63
64  private:
65    StoryEntity*                  currentEntity;                //!< reference to the currently used StoryEntity
66    std::list<StoryEntity*>       storyEntities;                //!< list of story entities
67};
68
69#endif /* _CAMPAIGN_H */
Note: See TracBrowser for help on using the repository browser.