| [2903] | 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: | 
|---|
| [3020] | 23 |  *      Val Mikos | 
|---|
| [2903] | 24 |  *   Co-authors: | 
|---|
| [3020] | 25 |  *      ... | 
|---|
| [2903] | 26 |  * | 
|---|
 | 27 |  */ | 
|---|
 | 28 |  | 
|---|
 | 29 | #ifndef _TeamBaseMatchBase_H__ | 
|---|
 | 30 | #define _TeamBaseMatchBase_H__ | 
|---|
 | 31 |  | 
|---|
| [3196] | 32 | #include "OrxonoxPrereqs.h" | 
|---|
 | 33 |  | 
|---|
| [2934] | 34 | #include "Pawn.h" | 
|---|
| [2903] | 35 |  | 
|---|
 | 36 | namespace orxonox | 
|---|
 | 37 | { | 
|---|
| [11071] | 38 |     enum class BaseState | 
|---|
| [2903] | 39 |     { | 
|---|
| [11071] | 40 |         Uncontrolled, | 
|---|
 | 41 |         ControlTeam1, | 
|---|
 | 42 |         ControlTeam2, | 
|---|
 | 43 |     }; | 
|---|
| [2903] | 44 |  | 
|---|
 | 45 |  | 
|---|
| [2934] | 46 |     class _OrxonoxExport TeamBaseMatchBase : public Pawn | 
|---|
| [2903] | 47 |     { | 
|---|
 | 48 |         public: | 
|---|
| [9667] | 49 |             TeamBaseMatchBase(Context* context); | 
|---|
| [2903] | 50 |  | 
|---|
| [3020] | 51 |             // if class closes, close everything | 
|---|
| [2934] | 52 |             virtual ~TeamBaseMatchBase() {} | 
|---|
| [3020] | 53 |  | 
|---|
 | 54 |  | 
|---|
 | 55 |  | 
|---|
 | 56 |             // Set the state of a base to whatever the argument of the function is | 
|---|
| [11071] | 57 |             void setState(BaseState state) | 
|---|
| [2934] | 58 |             { | 
|---|
 | 59 |                 this->state_ = state; | 
|---|
| [2985] | 60 |                 this->changeTeamColour(); | 
|---|
| [3020] | 61 |             } | 
|---|
| [2903] | 62 |  | 
|---|
 | 63 |  | 
|---|
| [3020] | 64 |             // Get the state of a base as a return value | 
|---|
| [11071] | 65 |             BaseState getState() const | 
|---|
| [3020] | 66 |             { | 
|---|
 | 67 |                 return this->state_; | 
|---|
 | 68 |             } | 
|---|
| [2903] | 69 |  | 
|---|
 | 70 |  | 
|---|
| [2934] | 71 |         protected: | 
|---|
| [2985] | 72 |             void changeTeamColour(); | 
|---|
| [2903] | 73 |  | 
|---|
| [11071] | 74 |             BaseState state_; | 
|---|
| [2934] | 75 |     }; | 
|---|
| [2903] | 76 | } | 
|---|
 | 77 |  | 
|---|
 | 78 | #endif /* _TeamBaseMatchBase_H__ */ | 
|---|