Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: GameObject/GameObject.h
- Revision:
- 9:f720f5d87420
- Parent:
- 8:9b77eea95088
- Child:
- 11:bb36db678a6d
--- a/GameObject/GameObject.h Wed May 08 13:49:01 2019 +0000 +++ b/GameObject/GameObject.h Wed May 08 23:09:43 2019 +0000 @@ -18,18 +18,18 @@ StaticGameObject(); /** Destructor */ ~StaticGameObject(); - /** Controls the movement physics of static game objects */ + /** Controls the movement physics of static game objects: Does nothing but is overwritten in GameObject. */ virtual void move(); - /** Draws the game objects */ + /** Draws the game object */ virtual void draw(N5110 &lcd); - /** Gets the x and y coordinates of game objects */ + /** Gets the x and y coordinates of game object */ const Vector2D& getPos() const; - /** Gets the width of the game objects - * @return the width of the game objects + /** Gets the width of the game object + * @return the width of the game object */ int getW() { return w; }; - /** Gets the height of the game objects - * @return the height of the game objects + /** Gets the height of the game object + * @return the height of the game object */ int getH() { return h; }; /** Sets the width of any game object @@ -39,7 +39,7 @@ void setW(int value) { w = value;} protected: int w, h; /** width and height of any game object */ - Vector2D pos; /** x and y position of any game objects */ + Vector2D pos; /** x and y position of any game object */ }; @@ -48,15 +48,14 @@ public: /** Constructor */ GameObject() : StaticGameObject() {} - /** Controls the movement physics of non-static game objects */ + /** Controls the movement physics of non-static game object */ virtual void move(); - /** Gets the velocity of the game objects - * @return the velocity of the game objects + /** Gets the velocity of the game object + * @return the velocity of the game object */ Vector2D& getVelocity() { return velocity; } protected: - Vector2D velocity; /** velocity of non-static game objects */ - + Vector2D velocity; /** velocity of non-static game object */ }; #endif \ No newline at end of file