Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/spacerace/src/modules/gametypes/RaceCheckPoint.h @ 8548

Last change on this file since 8548 was 8548, checked in by msalomon, 13 years ago
File size: 2.1 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 *      Mauro Salomon
24 *   Co-authors:
25 *      ...
26 *
27 */
28
29#ifndef _RaceCheckPoint_H__
30#define _RaceCheckPoint_H__
31
32#include "objects/ObjectsPrereqs.h"
33
34#include "objects/triggers/DistanceTrigger.h"
35#include "interfaces/RadarViewable.h"
36#include <boost/concept_check.hpp>
37
38namespace orxonox
39{
40    class _ObjectsExport RaceCheckPoint : public DistanceTrigger, public RadarViewable
41    {
42    public:
43        RaceCheckPoint(BaseObject* creator);
44        virtual ~RaceCheckPoint();
45       
46        virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
47        virtual void tick(float dt);
48       
49    protected:
50        virtual void triggered(bool bIsTriggered);
51        inline void setLast(bool isLast)
52            { this->bIsLast_ = isLast; }
53        inline bool getLast()
54            { return this->bIsLast_; }
55        inline void setCheckpointIndex(int checkpointIndex)
56            { this->bCheckpointIndex_ = checkpointIndex; }
57        inline int getCheckpointIndex()
58            { return this->bCheckpointIndex_; }
59        inline void setTimelimit(int timeLimit)
60            { this->bTimeLimit_ = timeLimit;}
61        inline int getTimeLimit()
62            { return this->bTimeLimit_;}
63        inline const WorldEntity* getWorldEntity() const
64            { return this; }
65       
66    private:
67        int bCheckpointIndex_;
68        bool bIsLast_;
69        int bTimeLimit_;
70     
71    };
72}
73
74#endif
Note: See TracBrowser for help on using the repository browser.