Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/trunk/src/modules/superorxobros/SOB.h @ 12008

Last change on this file since 12008 was 11783, checked in by landauf, 7 years ago

merged Presentation_HS17_merge back to trunk

  • Property svn:eol-style set to native
File size: 3.3 KB
RevLine 
[11370]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:
[11416]23 *      Julien Kindle
[11370]24 *   Co-authors:
[11416]25 *     
[11370]26 *
27 */
28
29/**
[11416]30    @file SOB.h
31    @brief Declaration of the SOB class.
[11370]32*/
33
[11378]34#ifndef _SOB_H__
35#define _SOB_H__
[11370]36
[11378]37#include "superorxobros/SOBPrereqs.h"
38#include "gametypes/Deathmatch.h"
39#include "SOBCenterpoint.h"
40
[11370]41namespace orxonox
42{
43
[11378]44    class _SOBExport SOB : public Deathmatch
[11370]45    {
[11405]46    public:
[11378]47            SOB(Context* context); //!< Constructor. Registers and initializes the object.
48            virtual ~SOB(); //!< Destructor. Cleans up, if initialized.
[11402]49            virtual void tick(float dt) override;
[11370]50
[11405]51
[11378]52            void setCenterpoint(SOBCenterpoint* center)
[11405]53            { this->center_ = center; }
54            virtual void start() override;
[11381]55            virtual void end() override;
56            virtual void spawnPlayer(PlayerInfo* player) override;
[11405]57            PlayerInfo* getPlayer() const;
[11381]58
[11412]59            void restart();
[11416]60
61            //Functions for points and coins
[11405]62            int getPoints() {
63                return points_;
64            }
65            int getCoins() {
66                return coins_;
67            }
68            void addCoin() {
69                ++coins_;
70                points_+=200;
71            }
72            void addMushroom() {
73                points_+=1000;
74            }
[11412]75            void addGumba() {
76                points_+=100;
77            }
[11783]78            void addGumbaBoss() {
79                points_+=5000;
80            }
[11416]81            void addPoints(int poi) {
82                points_+=poi;
83            }
[11405]84            int getTimeLeft() {
[11783]85                return (int) timeLeft_;
[11405]86            }
[11412]87            std::string getInfoText() {
88                return info_;
[11418]89            }   
90            void setDone(bool tr) {
91                done_ = tr;
[11412]92            }
[11416]93
94
95            //Not used yet - placed if somebody wants to develop lvl 1-2 etc
[11412]96            void setLvl(int lvl) {
97                lvl_ = lvl;
98            }
99            int getLvl() {
100                return lvl_;
101            }
102            virtual void playerEntered(PlayerInfo* player) override
[11405]103            {
104                Gametype::playerEntered(player);
105            } 
106
107            WeakPtr<SOBCenterpoint> center_;
[11783]108            bool newHighscore;
[11405]109
[11378]110        protected:
[11370]111
[11405]112
[11378]113            WeakPtr<SOBFigure> figure_;
[11405]114            int points_;
115            int coins_;
116            float timeLeft_;
[11418]117            bool done_;
[11412]118            int lvl_;
119            std::string info_;
[11370]120
[11405]121
122        };
123    }
124
[11416]125#endif /* _SOB_H__ */
Note: See TracBrowser for help on using the repository browser.