Main Page   Class Hierarchy   Data Structures   File List   Data Fields   Globals   Related Pages  

gameobj.h

Go to the documentation of this file.
00001 
00011 #ifndef GAMEOBJ_H
00012 #define GAMEOBJ_H
00013 
00014 class CBotInfo;
00015 
00017 struct TPosition
00018 {
00020     float mXPos;
00022     float mYPos;
00023 };
00024 
00029 class CGameObj
00030 {
00031 public:
00033     CGameObj(int aType);
00034 
00036     virtual ~CGameObj();
00037 
00039     float xPos();
00040     
00042     float yPos();
00043 
00045     float radius();
00046 
00048     float direction();
00049 
00051     int type();
00052 
00054     float animationTimer();
00055 
00056 protected:
00058     TPosition mPos;
00060     float mRadius;
00062     float mDirection;
00064     int mType;
00066     float mAnimationTimer;
00067 };
00068 
00073 class CMovingGameObj : public CGameObj
00074 {
00075 public:
00077     CMovingGameObj(int aType);
00078 
00080     virtual ~CMovingGameObj();
00081 
00083     float velocity();
00084 
00085 protected:
00090     void move(float aTimeFactor);
00091 
00101     void chkCollision(const char **aTileMap, CBotInfo **aBots, bool aCollisionWithObstacles);
00102 
00111     TPosition scanTileMap(const char **aSrcTileMap, float aAngle, CTileMap *aDstTileMap);
00112 
00114     virtual void handleCollision(int aType) = 0;
00115 
00117     float mVelocity;
00118 
00119 private:
00120     float mMovingTimeFactor;
00121 };
00122 
00123 #endif // GAMEOBJ_H

Generated on Mon Jun 9 22:02:24 2003 for Drunken Bot III by doxygen1.3-rc3