00001 00007 #ifndef _GRANADE_H_ 00008 #define _GRANADE_H_ 00009 00010 #include "../../Math/Vector.h" 00011 #include "../../Util/Objects/ObjLevel.h" 00012 #include "../../Util/Log.h" 00013 00014 class Granade { 00015 public: 00016 Granade(); 00017 virtual ~Granade(); 00018 00019 void create(Vec3 p, Vec3 v, float l, float s = 1.0f); 00020 bool update(float dTime, ObjLevel *lvl); 00021 00022 Vec3 getPos() { return m_position; } 00023 float getStrength() { return m_strength; } 00024 bool isAlive() { return m_life != 0.0f; } 00025 void setPlayerID(int id) { playerID = id; } 00026 int getPlayerID() { return playerID; }; 00027 00028 protected: 00029 Vec3 m_position; 00030 Vec3 m_prevPosition; 00031 Vec3 m_velocity; 00032 float m_life; 00033 float m_strength; 00034 int playerID; 00035 }; 00036 00037 #endif