Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/trunk/src/orxonox/objects/pickup/PickupSpawner.h @ 2850

Last change on this file since 2850 was 2662, checked in by rgrieder, 16 years ago

Merged presentation branch back to trunk.

  • Property svn:eol-style set to native
File size: 1.4 KB
Line 
1#ifndef _PickupSpawner_H__
2#define _PickupSpawner_H__
3
4#include "OrxonoxPrereqs.h"
5#include "BaseItem.h"
6#include "tools/Timer.h"
7#include "objects/worldentities/StaticEntity.h"
8#include "objects/Tickable.h"
9
10namespace orxonox
11{
12        class _OrxonoxExport PickupSpawner : public StaticEntity, public Tickable
13        {
14        public:
15        PickupSpawner(BaseObject* creator);
16        virtual ~PickupSpawner();
17        virtual void changedActivity();
18        virtual void tick(float dt);
19        virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
20        virtual void triggering(Pawn* trigger); // Wenn ein Spieler in die Naehe kommt
21        void triggerRespawnTimer();
22
23        /*inline void setVisibility(bool visible)
24                { this->setActive(visible); }
25        inline float getVisibility() const
26                { return this->isActive(); }*/
27
28        void setItemTemplate(const std::string& itemtemplate);
29        inline const std::string& getItemTemplate() const
30                { return this->itemtemplate_; }
31
32        inline void setDistance(float distance)
33                { this->distance_ = distance; }
34        inline float getDistance() const
35                { return this->distance_; }
36        inline void setRespawnTimer (float respawntimer)
37                { this->respawntimer_ = respawntimer; }
38        inline float getRespawnTimer() const
39                { return this->respawntimer_; }
40
41        private:
42        std::string itemtemplate_;
43        Template* template_;
44        float distance_;
45        float respawntimer_;
46        Timer<BaseObject> RespawnTimer_;
47        };
48}
49
50#endif /* _PickupSpawner_H__ */
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
Note: See TracBrowser for help on using the repository browser.