From: Ivan Hernandez Date: Sun, 16 Jan 2011 06:06:25 +0000 (-0600) Subject: Added World Object.h X-Git-Url: http://git.mmlx.us/?a=commitdiff_plain;h=1ad8f27ff7be0f5647cd321931cd52ca2ff3159e;p=IvanGame.git Added World Object.h --- diff --git a/WorldObject.h b/WorldObject.h new file mode 100644 index 0000000..d9f5787 --- /dev/null +++ b/WorldObject.h @@ -0,0 +1,18 @@ +#ifndef WORLDOBJECT +#define WORLDOBJECT +class WorldObject +{ + public: + void draw();/**< draws Sprite. */ + void xadd(int num) {mPos.X += num;}/**< Increase X coordiante by a given amount. */ + void yadd(int num) {mPos.Y += num;}/**< Increase Y coordinate by a given amount. */ + void xset(int x) {mPos.X = x;}/**< Sets the Sprite's X Coordinate. */ + void yset(int y) {mPos.Y = y;}/**< Sets the Sprite's Y coordinate. */ + void setPosition(int x, int y) {mPos.X = x; mPos.Y = y;}/**< Sets the Sprite's X an Y coordinate. */ + + private: + Point2D mPos;/**< Object's position */ + bool mVisible;/**< Determine if Object should be visible */ + int ZOrder;/**< Stacking order. Determines what draws on top. \todo implement. */ +}; +#endif