00001 #pragma once 00002 #include "gmodel.h" 00003 #include "ganimatedmesh.h" 00004 00005 class Grenade :public GModel 00006 { 00007 protected: 00008 static GAnimatedMesh *GrenadeMesh; 00009 static GSkeleton *GrenadeSkeleton; 00010 static bool VBOInitialized; 00011 00012 double BlastRadius; 00013 int NoFragments; 00014 double CreationTime; 00015 double LifeTime; 00016 00017 public: 00018 Grenade(void); 00019 ~Grenade(void); 00020 int Detonate(void); 00021 void SetBlastRadius(double _n); 00022 double GetBlastRadius(void); 00023 void SetNoFragments(int _n); 00024 int GetNoFragments(void); 00025 void SetCreationTime(double _t); 00026 double GetCreationTime(void); 00027 void SetLifeTime(double _n); 00028 double GetLifeTIme(void); 00029 virtual int Draw(double time, double dtime, GMatrix16 *viewmatrix, GMatrix16 *worldmatrix, int FLAGS); 00030 virtual int Update(double time, double dtime, int FLAGS); 00031 static int InitGrenades(int FLAGS); 00032 };