After what I've learned a class should look like this:
class Object{public: Object(int x, int y, int width, int height, ObjectType type, int ID, bool stati = true); virtual ~Object(); virtual void draw(void); virtual void update(float dt); void updateRect(void); int getX(void) {return mX;}; int getY(void) {return mY;}; int getHeight(void) {return mHeight;}; int getWidth(void) {return mWidth;}; int getID(void) {return mID;}; int getType(void) {return mType;}; int getStatic(void) {return mStatic;} RECT getRect(void) {return mRect;};private: IDirect3DTexture9* mTexture; RECT mRect; int mX; int mY; int mWidth; int mHeight; int mID; ObjectType mType; bool mStatic;};
I also will have to 8 more setXXX(...) functions in order to change the member variabels. If the member variables would have been public then I would have 16 less functions to worry about ... Please explain why I shouldn't do it that way.
Thanks,
simpler [smile]