Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/Merge_HS18/src/orxonox/gametypes/StoryMode.cc @ 12180

Last change on this file since 12180 was 12180, checked in by merholzl, 5 years ago

World Map merging

  • Property svn:eol-style set to native
File size: 2.9 KB
Line 
1/*
2 *   ORXONOX - the hottest 3D action shooter ever to exist
3 *                    > www.orxonox.net <
4 *
5 *
6 *   License notice:
7 *
8 *   This program is free software; you can redistribute it and/or
9 *   modify it under the terms of the GNU General Public License
10 *   as published by the Free Software Foundation; either version 2
11 *   of the License, or (at your option) any later version.
12 *
13 *   This program is distributed in the hope that it will be useful,
14 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
15 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 *   GNU General Public License for more details.
17 *
18 *   You should have received a copy of the GNU General Public License
19 *   along with this program; if not, write to the Free Software
20 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
21 *
22 *   Author:
23 *      Marvin Haeberle & Julian Huwyler
24 *   Co-authors:
25 *      ...
26 *
27 */
28
29#include "StoryMode.h"
30
31#include "items/Engine.h"
32#include "controllers/ArtificialController.h"
33
34#include "core/CoreIncludes.h"
35#include "core/command/ConsoleCommandIncludes.h"
36#include "infos/PlayerInfo.h"
37#include "network/Host.h"
38#include "worldentities/pawns/Pawn.h"
39#include "LevelManager.h"
40
41namespace orxonox
42{
43
44    SetConsoleCommand("StoryMode", "exit", &StoryMode::exit);
45    RegisterUnloadableClass(StoryMode);
46   
47    StoryMode::StoryMode(Context* context) : Gametype(context)
48    {
49       
50        RegisterObject(StoryMode);
51
52        this->gtinfo_ = new GametypeInfo(context);
53        this->bAutoStart_ = true;
54        this->bForceSpawn_ = true;
55    }
56
57   
58  /*
59    void StoryMode::start()
60    {
61        Gametype::start();
62
63        this->gtinfo_->sendAnnounceMessage("Marvin isch Chef");
64    }
65*/
66    void StoryMode::exit()
67    {
68     
69        for (StoryMode* mission : ObjectList<StoryMode>())
70        { //TODO: make sure that only the desired mission is ended !! This is a dirty HACK, that would end ALL missions!
71            mission->end();
72        }
73        //Gametype::end();
74    }
75/*
76    void Mission::setTeams()
77    { //Set pawn-colours
78        for (Pawn* pawn : ObjectList<Pawn>())
79        {
80            if (!pawn)
81                continue;
82            this->setDefaultObjectColour(pawn);
83        }
84    }
85    void Mission::endMission(bool accomplished)
86    {
87        for (Mission* mission : ObjectList<Mission>())
88        { //TODO: make sure that only the desired mission is ended !! This is a dirty HACK, that would end ALL missions!
89            mission->setMissionAccomplished(accomplished);
90            mission->end();
91        }
92    }
93
94    void Mission::setLivesWrapper(unsigned int amount)
95    {
96        for (Mission* mission : ObjectList<Mission>())
97        { //TODO: make sure that only the desired mission is ended !! This is a dirty HACK, that would affect ALL missions!
98            mission->setLives(amount);
99        }
100    }*/
101}
Note: See TracBrowser for help on using the repository browser.