Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/TixyTaxyTorxy_HS18/src/modules/TixyTaxyTorxy/TixyTaxyTorxy.h @ 12194

Last change on this file since 12194 was 12149, checked in by thomkell, 6 years ago

final

File size: 3.5 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 *
24 *   Co-authors:
25 *      ...
26 *
27 */
28
29
30#ifndef _TixyTaxyTorxy_H__
31#define _TixyTaxyTorxy_H__
32#include "TixyTaxyTorxyCoordinate.h"
33#include "TixyTaxyTorxySelecter.h"
34#include "TixyTaxyTorxy/TixyTaxyTorxyPrereqs.h"
35#include "gametypes/TeamDeathmatch.h"
36#include "util/Output.h"
37#include "TixyTaxyTorxyField.h"
38
39namespace orxonox
40{
41    /**
42    @brief
43    GameType class for TixyTaxyTorxy
44TixyTaxyTorxy. See TixyTaxyTorxy
45TixyTaxyTorxyReadme.txt for Information.
46
47    @ingroup TixyTaxyTorxy
48TixyTaxyTorxy
49    */
50    class _TixyTaxyTorxyExport TixyTaxyTorxy : public TeamDeathmatch
51    {
52    public:
53        TixyTaxyTorxy(Context* context);
54        virtual ~TixyTaxyTorxy();       
55        virtual void start() override; //<! The function is called when the gametype starts
56        virtual void end() override;
57        virtual void tick(float dt) override;
58        virtual void spawnPlayer(PlayerInfo* player) override;
59        PlayerInfo* getPlayer(void) const;
60        int getCredit(){ return this->credit_; }
61        void payCredit(int pay){ this->credit_ -= pay; }
62        int getLifes(){ return this->lifes_; }
63        int getWaveNumber(){ return this->waveNumber_; }
64        void setWaveNumber(int wavenumber){ waveNumber_=wavenumber; }
65        void setCredit(int credit){ credit_ = credit; }
66        void setLifes(int lifes){ lifes_ = lifes; }       
67        void buyTower(int cost){ cost -= cost;}
68        void addCredit(int credit) { credit_+=credit; }
69        int reduceLifes(int NumberofLifes){ return lifes_-=NumberofLifes; }
70        TixyTaxyTorxyField* getField(TixyTaxyTorxyCoordinate* coord){ return fields_[coord->GetX()][coord->GetY()]; }
71        void setCenterpoint(TixyTaxyTorxyCenterpoint* centerpoint);       
72        void addTower(int x, int y);
73        void upgradeTower(int x, int y);
74        int checkRow(int x, int y);
75        int checkColumn(int x, int y);
76        int checkMinigame(int x, int y);
77        int checkDiagLtR(int x, int y);
78        int checkDiagRtL(int x, int y);
79        bool getPlayer2Value();
80        bool getPlayer1Value();
81       
82        TixyTaxyTorxySelecter* selecter;       
83
84    private:
85        void createFields();
86
87        orxonox::WeakPtr<TixyTaxyTorxyCenterpoint> center_;
88        PlayerInfo* player_;
89        float timeSinceLastSpawn_;
90        float timeUntilNextWave_;
91        int waveSize_;
92        int credit_;
93        int waveNumber_;
94        int lifes_;
95        bool player1;
96        bool player2;
97        TixyTaxyTorxyField* fields_[11][11];
98        std::vector<orxonox::WeakPtr<TixyTaxyTorxyField>> waypoints_;
99        Vector3 endpoint_;
100        Vector3 offset_;       
101    };
102}
103
104#endif /* _TixyTaxyTorxy
105TixyTaxyTorxy_H__ */
Note: See TracBrowser for help on using the repository browser.