D:/simple_rts/include/Projectile.h

Go to the documentation of this file.
00001 #ifndef __PROJECTILE_H__
00002 #define __PROJECTILE_H__
00003 
00004 #include "OgreEntity.h"
00005 #include "OgreVector3.h"
00006 
00007 using Ogre::Entity;
00008 using Ogre::Vector3;
00009 
00010 namespace ASR
00011 {
00012         class Unit;
00013 
00021         class Projectile
00022         {
00023         // Data Storage
00024         // ----------------------------------------------------------------------------
00025         private:
00026                 Unit*           mSource;
00027                 Unit*           mTarget;
00028 
00029                 float           mSpeed;
00030                 float           mDamage;
00031 
00032                 Entity*         mEntity;
00033 
00034 
00035                 // HACK
00036                 static int      mNumBullets;
00037 
00038 
00039         // Construction
00040         // ----------------------------------------------------------------------------
00041         public:
00042                 Projectile ( Unit* source, Unit* target );
00043                 ~Projectile ();
00044 
00045                 void setDamage ( float damage );
00046                 void setSpeed ( float speed );
00047 
00048                 float getDamage () const;
00049                 float getSpeed () const;
00050 
00057                 bool update ();
00058 
00059 
00060         // Helpers
00061         // ----------------------------------------------------------------------------
00062         private:
00063                 void _generateEntity ();
00064                 void _destroyEntity ();
00065 
00066                 Vector3 getPosition () const;
00067         };
00068 }
00069 
00070 #endif

Generated on Sun Jun 25 19:23:43 2006 for Valors End by  doxygen 1.4.7