Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages  

Character.h

Go to the documentation of this file.
00001 
00007 #ifndef _CHARACTER_H_
00008 #define _CHARACTER_H_
00009 
00010 #include "IsoBomb.h"
00011 #include "CharacterProps.h"
00012 #include "Entity.h"
00013 #include "GameDXListener.h"
00014 
00015 class ConfigFile;
00016 class Virus;
00017 
00022 class Character : public Entity, GameDXListener {
00023 
00024 public:
00025 
00029     static void initVars( ConfigFile& f );
00030 
00034     Character();
00035 
00043     Character( const Rect& initPos, int initDir, int wins );
00044 
00048     virtual ~Character();
00049 
00060     bool affectMe( const CharacterProps& modprops );
00061 
00067     void affectMe( Virus* v );
00068 
00074     Virus* getVirus() const;
00075 
00081     void chargeThrow( float dt );
00082 
00086     void throwBomb();
00087 
00094     void move( int dir, float dt );
00095 
00103     void noMove( float dt );
00104 
00108     void draw( const Point& anchor );
00109 
00116     bool update( float dt );
00117 
00121     void resetProps();
00122 
00126     void stopAnimation();
00127 
00133     bool isCharging() const;
00134 
00138     void homingBomb();
00139 
00145     void setEnemy( const Character* c );
00146 
00152     void decBombCounter();
00153 
00158     void decHitPoints();
00159 
00163     void drawHUD( const Point& anchor );
00164 
00170     virtual float getHeight() const;
00171 
00175     void moveBack();
00176 
00183     virtual void doCollision( Entity* otherEntity );
00184 
00190     bool isDead() const;
00191 
00197     CharacterProps getProps() const;
00198 
00206     void setShrink( bool shrink );
00207 
00215     virtual bool checkCollision( const Entity* otherEntity );
00216 
00217 public:
00221     virtual void OnLostDevice();
00222 
00226     virtual void OnResetDevice();
00227 
00228 private:
00229 
00230     static float invincibleTime;
00231 
00235     CharacterProps props;
00236 
00240     int numBombs;
00241 
00245     float power;
00246 
00250     const Character* enemy;
00251 
00255     LPD3DXSPRITE hudSprite;
00256 
00260     float invincibleTimer;
00261 
00265     Rect lastPos;
00266 
00270     bool dead;
00271 
00272     float spinSpeed;
00273     float totalTimeSinceDeath;
00274     float spinDirection;
00275 
00279     int numWins;
00280 
00284     Virus* virus;
00285 
00286 };
00287 
00288 #endif

Generated on Tue Mar 4 02:29:25 2003 for SuperIsoBomb by doxygen1.2.18