src/IGameObject.h

00001 #ifndef IGAMEOBJECT_H
00002 #define IGAMEOBJECT_H
00003 
00004 #include <iostream>
00005 
00006 #include "SDL.h"
00007 #include "Location.h"
00008 
00009 #define GO_INVALID  (0)     
00010 #define GO_PLAYER   (1)     
00016 class IGameObject
00017 {
00018 public:
00022     IGameObject(Uint32 serial, Uint16 type);
00023 
00027     virtual ~IGameObject();
00028 
00036     Uint32 getSerial() {return mSerial;}
00037 
00045     Uint16 getType() {return mType;}
00046 
00054     Uint32 getOwner() {return mOwner;}
00055 
00063     void setOwner(Uint32 newOwner);
00064 
00073     std::string getName() {return mName;}
00074 
00082     void setName(std::string newName);
00083 
00093     const Location& getPosition() {return mPos;}
00094 
00102     void setPosition(const Location& newPos) {mPos = newPos;}
00103 
00111     void setPosition(Location * newPos) {mPos = *newPos;}
00112 
00117     virtual void update() = 0;
00118 
00119 private:
00120 
00121     Uint32 mSerial;     
00122     Uint16 mType;       
00123     Uint32 mOwner;      
00124     std::string mName;  
00125     Location mPos;      
00127 };
00128 
00129 
00130 
00131 #endif // IGAMEOBJECT_H

Generated on Mon Dec 3 04:30:13 2007 for lo-testserver by  doxygen 1.3.9.1