Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/trunk/src/modules/towerdefense/TowerDefensePlayerStats.h @ 11458

Last change on this file since 11458 was 10258, checked in by landauf, 10 years ago

merged presentationHS14merge back to trunk

  • Property svn:eol-style set to native
File size: 2.2 KB
RevLine 
[9207]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 */
[9272]28
[10258]29 /*
[9272]30    @brief
31        This manages the stats of the player. It is used by 'TowerDefense', the gametype
32
33    @ingroup TowerDefense
[9207]34
[9272]35
[10258]36
[9207]37#ifndef _TowerDefensePlayerStats_H__
38#define _TowerDefensePlayerStats_H__
39
40#include "towerdefense/TowerDefensePrereqs.h"
41
42namespace orxonox
43{
[9272]44    typedef enum _TowerCosts {
45        // Set to 0 for debug...
[10258]46        TDDefaultTowerCost = 20 ,
47        TDDefaultUpgradeCost = 15
[9272]48    } TowerCost;
49
[9207]50    class _TowerDefenseExport TowerDefensePlayerStats
51    {
[9272]52    public:
53        TowerDefensePlayerStats();
54
55        inline int getCredit()
56            { return credit_; }
57
58        inline void setCredit(int credit)
59            { credit_ = credit; }
60
61        inline void buyTower(TowerCost cost)
62            { credit_ -= cost;}
63
64        inline int getWaveNumber()
65            { return waveNumber_; }
66
67        inline void didLoadNextWave()
68            { waveNumber_++; }
69
[10258]70        inline int getLifes()
71            {return lifes_; }
72
73        inline void reduceLifes(int NumberofLifes)
74        {lifes_-=NumberofLifes; }
75
76        inline void upgradeTower(int upgradecost)
77            { credit_ -= upgradecost;}
78
79
80
[9272]81    private:
82        int credit_;
83        int waveNumber_;
[10258]84        int upgradecost;
85        int lifes_;
[9272]86        //int baseHealth_;
[9207]87    };
88}
89
[10258]90#endif  _TowerDefensePlayerStats_H__ */
Note: See TracBrowser for help on using the repository browser.