Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/SuperOrxoBros_FS17/src/modules/superorxobros/SOB.h @ 11412

Last change on this file since 11412 was 11412, checked in by jkindle, 8 years ago

Fixed turning, added and finished Gumbas, added turnOnCollide for all NPC and items, added Flagstone - todo: add points on flagstone hit and go into a between lvl mode, then warp to lvl 2. AAH, and added onDeath fcts…

File size: 3.0 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:
[11378]23 *      Fabian 'x3n' Landau
[11370]24 *   Co-authors:
25 *      ...
26 *
27 */
28
29/**
[11378]30    @file Pong.h
31    @brief Declaration of the Pong class.
32    @ingroup Pong
[11370]33*/
34
[11378]35#ifndef _SOB_H__
36#define _SOB_H__
[11370]37
[11378]38#include "superorxobros/SOBPrereqs.h"
[11370]39
40#include "tools/Timer.h"
41
[11378]42#include "gametypes/Deathmatch.h"
43#include "SOBCenterpoint.h"
44
[11370]45namespace orxonox
46{
47
[11405]48
[11378]49    class _SOBExport SOB : public Deathmatch
[11370]50    {
[11405]51    public:
[11378]52            SOB(Context* context); //!< Constructor. Registers and initializes the object.
53            virtual ~SOB(); //!< Destructor. Cleans up, if initialized.
[11402]54            virtual void tick(float dt) override;
[11370]55
[11405]56
[11378]57            void setCenterpoint(SOBCenterpoint* center)
[11405]58            { this->center_ = center; }
59            virtual void start() override;
[11381]60            virtual void end() override;
61            virtual void spawnPlayer(PlayerInfo* player) override;
[11405]62            PlayerInfo* getPlayer() const;
[11381]63
[11412]64            void restart();
[11405]65            int getPoints() {
66                return points_;
67            }
68            int getCoins() {
69                return coins_;
70            }
71            void addCoin() {
72                ++coins_;
73                points_+=200;
74            }
75            void addMushroom() {
76                points_+=1000;
77            }
[11412]78            void addGumba() {
79                points_+=100;
80            }
[11405]81            int getTimeLeft() {
82                return timeLeft_;
83            }
[11412]84            std::string getInfoText() {
85                return info_;
86            }
[11405]87           
[11412]88            void setLvl(int lvl) {
89                lvl_ = lvl;
90            }
91            int getLvl() {
92                return lvl_;
93            }
94            virtual void playerEntered(PlayerInfo* player) override
[11405]95            {
96                Gametype::playerEntered(player);
97            } 
98
99
100            WeakPtr<SOBCenterpoint> center_;
101
[11378]102        protected:
[11370]103
[11405]104
[11383]105            void cleanup(); //!< Cleans up the Gametype
[11378]106            WeakPtr<SOBFigure> figure_;
107            WeakPtr<Camera> camera;
[11405]108            int points_;
109            int coins_;
110            float timeLeft_;
[11412]111       
112            int lvl_;
113            std::string info_;
[11370]114
[11405]115
116        };
117    }
118
[11378]119#endif /* _Pong_H__ */
Note: See TracBrowser for help on using the repository browser.