Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/trunk/src/orxonox/gametypes/StoryMode.cc @ 11359

Last change on this file since 11359 was 11359, checked in by patricwi, 3 years ago

story mode map merged

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        RegisterObject(StoryMode);
50
51        this->gtinfo_ = new GametypeInfo(context);
52        this->bAutoStart_ = true;
53        this->bForceSpawn_ = true;
54    }
55
56   
57  /*
58    void StoryMode::start()
59    {
60        Gametype::start();
61
62        this->gtinfo_->sendAnnounceMessage("Marvin isch Chef");
63    }
64*/
65    void StoryMode::exit()
66    {
67        orxout() << "s funktioniert"<< endl;
68        for (StoryMode* mission : ObjectList<StoryMode>())
69        { //TODO: make sure that only the desired mission is ended !! This is a dirty HACK, that would end ALL missions!
70            mission->end();
71        }
72        //Gametype::end();
73    }
74/*
75    void Mission::setTeams()
76    { //Set pawn-colours
77        for (Pawn* pawn : ObjectList<Pawn>())
78        {
79            if (!pawn)
80                continue;
81            this->setDefaultObjectColour(pawn);
82        }
83    }
84    void Mission::endMission(bool accomplished)
85    {
86        for (Mission* mission : ObjectList<Mission>())
87        { //TODO: make sure that only the desired mission is ended !! This is a dirty HACK, that would end ALL missions!
88            mission->setMissionAccomplished(accomplished);
89            mission->end();
90        }
91    }
92
93    void Mission::setLivesWrapper(unsigned int amount)
94    {
95        for (Mission* mission : ObjectList<Mission>())
96        { //TODO: make sure that only the desired mission is ended !! This is a dirty HACK, that would affect ALL missions!
97            mission->setLives(amount);
98        }
99    }*/
100}
Note: See TracBrowser for help on using the repository browser.