Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 2, 2006, 1:30:23 AM (18 years ago)
Author:
patrick
Message:

network: many changes in the StoryEntity and Campaign framework: introduced CampaignData as a container for the data of the Campaign and made some changes in the GameWorlds, which are not yet finished

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/network/src/story_entities/campaign.h

    r6374 r6386  
     1/*!
     2 * @file campaign.h
     3 * definition of the campaign
     4 */
    15
    26#ifndef _CAMPAIGN_H
    37#define _CAMPAIGN_H
    48
     9
    510#include "story_entity.h"
    6 
    711#include <list>
    812
    9 class World;
     13
    1014class TiXmlElement;
     15class CampaignData;
    1116
     17
     18//! A class that represents a game Campaign that contains other StoryEntities like GameWorlds, movies, etc.
    1219class Campaign : public StoryEntity
    1320{
     
    2229    virtual ErrorMessage init();
    2330    virtual ErrorMessage start();
    24     virtual ErrorMessage start(int storyID);
    2531    virtual ErrorMessage pause();
    2632    virtual ErrorMessage resume();
    2733    virtual ErrorMessage stop();
    2834
    29     void addEntity(StoryEntity* se, int storyID);
    30     void addEntity(StoryEntity* se);
    31     void removeEntity(int storyID);
    32     void removeEntity(StoryEntity* se);
    33 
    34     void nextLevel();
    35     void previousLevel();
     35    void switchToNextLevel();
    3636
    3737
    3838  private:
    39     StoryEntity* getStoryEntity(int storyID);
    40 
    41 
    42   private:
    43     StoryEntity* currentEntity;
    44     std::list<StoryEntity*> entities;
    45     bool running;
    46 
     39    StoryEntity*                        currentEntity;          //!< reference to the current StoryEntity
     40    CampaignData*                       campaignData;           //!< reference to the CampaignData
    4741};
    4842
    4943
    5044
     45//! A class that contains the data of the Campaign object
    5146class CampaignData : virtual public BaseObject
    5247{
     
    5651    virtual ~CampaignData();
    5752
    58     void addStoryEntity(StoryEntity* se, int storyID = -1);
     53    void addStoryEntity(StoryEntity* se);
    5954
    60     void getNextLevel();
     55    StoryEntity* getFirstLevel();
     56    StoryEntity* getNextLevel();
     57
     58
     59  private:
     60    StoryEntity*                  currentEntity;                //!< reference to the currently used StoryEntity
     61    std::list<StoryEntity*>       storyEntities;                //!< list of story entities
    6162};
    6263
Note: See TracChangeset for help on using the changeset viewer.