Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxStones.h @ 12393

Last change on this file since 12393 was 12393, checked in by ahuwyler, 5 years ago

BOUNCE

File size: 2.2 KB
Line 
1#ifndef _OrxoBloxStones_H__
2#define _OrxoBloxStones_H__
3
4
5#include "OrxoBlox/OrxoBloxPrereqs.h"
6
7
8#include "worldentities/StaticEntity.h"
9#include "worldentities/pawns/Pawn.h"
10#include "tools/Timer.h"
11
12namespace orxonox
13{
14
15    /**
16    @brief
17
18    @author
19
20    @ingroup OrxoBlox
21    */
22    class _OrxoBloxExport OrxoBloxStones : public Pawn
23    {
24        public:
25            OrxoBloxStones(Context* context); //!< Constructor. Registers and initializes the object.
26            virtual ~OrxoBloxStones() {}
27             //   this.destroy();
28            //}
29
30            /**
31            @brief Set the size of the stone.
32            @param size The dimensions a stone has in the game world. (A stone is a cube)
33            */
34            void setSize(float size)
35                { this->size_ = size; }
36            /**
37            @brief Get the size of the stone.
38            @return Returns the dimensions a stone has in the game world. (A stone is a cube)
39            */
40            float getSize(void) const
41                { return this->size_; }
42            /**
43            @brief Set the Health of the stone.
44            @param size The dimensions a stone has in the game world. (A stone is a cube)
45            */
46            void setHealth(unsigned int health)
47                { 
48                    this->health_ = health; 
49                }
50            /**
51            @brief Get the size of the stone.
52            @return Returns the dimensions a stone has in the game world. (A stone is a cube)
53            */
54            unsigned int getHealth(void) const
55                { return this->health_; }
56
57            void gotHit(){
58                if (this->health_ > 0){
59                    this->health_ -= this->health_; 
60                    }
61                //  else ~OrxoBloxStones();
62                }
63
64            void setGame(OrxoBlox* orxoblox)
65                { assert(orxoblox); orxoblox_ = orxoblox; }
66
67            unsigned int getHealth();
68
69            void reduceHealth();
70
71            float getSize();
72               
73        private:
74            float size_; //!< The dimensions a stone has in the game world.
75            unsigned int health_;
76            bool delay_;
77           
78            OrxoBlox* orxoblox_;
79           
80
81    };
82}
83
84#endif /* _OrxoBloxStones_H__ */
Note: See TracBrowser for help on using the repository browser.