00001 #ifndef AMMO_H 00002 #define AMMO_H 00003 00004 #include "Agent.h" 00005 #include "Models.h" 00006 #include "UserAgent.h" 00007 #include <ngl/Camera.h> 00008 00017 00018 class Agent; 00019 class Models; 00020 class UserAgent; 00021 00022 class Ammo 00023 { 00024 public: 00025 //---------------------------------------------------------------------------------------------------------------------- 00032 //---------------------------------------------------------------------------------------------------------------------- 00033 Ammo(UserAgent* _parent,Models *_model, ngl::Vec3 _pos,std::string _meshName,ngl::Vec3 _velocity); 00034 //---------------------------------------------------------------------------------------------------------------------- 00036 //---------------------------------------------------------------------------------------------------------------------- 00037 ~Ammo(); 00038 //---------------------------------------------------------------------------------------------------------------------- 00041 //---------------------------------------------------------------------------------------------------------------------- 00042 void setTarget(const ngl::Vec3 _pos); 00043 //---------------------------------------------------------------------------------------------------------------------- 00045 //---------------------------------------------------------------------------------------------------------------------- 00046 ngl::Vec3 inline getPos(){return m_pos;} 00047 //---------------------------------------------------------------------------------------------------------------------- 00051 //---------------------------------------------------------------------------------------------------------------------- 00052 void draw(ngl::TransformStack *_tx, ngl::Camera *_cam); 00053 //---------------------------------------------------------------------------------------------------------------------- 00055 //---------------------------------------------------------------------------------------------------------------------- 00056 void update(); 00057 //---------------------------------------------------------------------------------------------------------------------- 00059 //---------------------------------------------------------------------------------------------------------------------- 00060 void inline setLifeStatus(){m_bulletLife = false;} 00061 //---------------------------------------------------------------------------------------------------------------------- 00063 //---------------------------------------------------------------------------------------------------------------------- 00064 bool inline getLifeStatus(){return m_bulletLife;} 00065 //---------------------------------------------------------------------------------------------------------------------- 00067 //---------------------------------------------------------------------------------------------------------------------- 00068 UserAgent* getparent(){return m_parent;} 00069 00070 protected: 00071 //---------------------------------------------------------------------------------------------------------------------- 00073 //---------------------------------------------------------------------------------------------------------------------- 00074 UserAgent* m_parent; 00075 //---------------------------------------------------------------------------------------------------------------------- 00077 //---------------------------------------------------------------------------------------------------------------------- 00078 Models* m_model; 00079 //---------------------------------------------------------------------------------------------------------------------- 00081 //---------------------------------------------------------------------------------------------------------------------- 00082 ngl::Vec3 m_velocity; 00083 //---------------------------------------------------------------------------------------------------------------------- 00085 //---------------------------------------------------------------------------------------------------------------------- 00086 ngl::Vec3 m_pos; 00087 //---------------------------------------------------------------------------------------------------------------------- 00089 //---------------------------------------------------------------------------------------------------------------------- 00090 std::string m_meshName; 00091 //---------------------------------------------------------------------------------------------------------------------- 00093 //---------------------------------------------------------------------------------------------------------------------- 00094 ngl::Vec3 m_target; 00095 //---------------------------------------------------------------------------------------------------------------------- 00097 //---------------------------------------------------------------------------------------------------------------------- 00098 bool m_bulletLife; 00099 }; 00100 00101 #endif // AMMO_H