unitWeapons.h

Go to the documentation of this file.
00001 /*
00002  * unitWeapons.h
00003  *
00004  *  Created on: Feb 28, 2012
00005  *      Author: sushil
00006  */
00007 
00008 #ifndef UNITWEAPONS_H_
00009 #define UNITWEAPONS_H_
00010 
00011 #include <aspect.h>
00012 #include <enums.h>
00013 
00014 #include <target.h>
00015 
00016 #include <weaponMgr.h>
00017 
00018 namespace FastEcslent {
00019 
00020         class DistanceMgr;
00021         class Entity;
00022 
00023         class Weapon: public UnitAspect {
00024         private:
00025                 Target target;
00026 
00027 
00028         public:
00029                 WeaponType weaponType;
00030 
00031                 double        damageDone;
00032                 double      damageMultiplier;
00033 
00034 
00035                 double        hitpoints;
00036                 double      armor;
00037 
00038                 DistanceMgr* distanceMgr;
00039                 WeaponMgr*   weaponMgr;
00040 
00041                 Weapon(Entity *ent, UnitAspectType ast, WeaponType wType);
00042                 void dealDamageToTarget(Target tgt, double dt); //sets target
00043                 void  setTarget();
00044                 Target getTarget();
00045                 void takeDamage(double amt, double dt);
00046                 virtual void  tick(double dt);
00047                 virtual void  init();
00048 
00049         };
00050 
00051 
00052 
00053 }
00054 
00055 
00056 #endif /* UNITWEAPONS_H_ */

Generated on Fri Dec 13 14:54:16 2013 for FastECSLent by  doxygen 1.5.4