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.
Dependencies: mbed
GameObject/GameObject.h@8:c3cf8d1057bb, 2017-05-03 (annotated)
- Committer:
- el15as
- Date:
- Wed May 03 14:25:55 2017 +0000
- Revision:
- 8:c3cf8d1057bb
- Parent:
- 6:33fd1797beb4
- Child:
- 12:0a5758356381
Menu added with its own separate engine
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| el15as | 4:1f7f32f3e017 | 1 | #ifndef GAMEOBJECT_H |
| el15as | 4:1f7f32f3e017 | 2 | #define GAMEOBJECT_H |
| el15as | 4:1f7f32f3e017 | 3 | |
| el15as | 4:1f7f32f3e017 | 4 | #include "mbed.h" |
| el15as | 4:1f7f32f3e017 | 5 | #include "N5110.h" |
| el15as | 4:1f7f32f3e017 | 6 | #include "Gamepad.h" |
| el15as | 4:1f7f32f3e017 | 7 | |
| el15as | 6:33fd1797beb4 | 8 | #define OBJECTCOUNT 51 |
| el15as | 8:c3cf8d1057bb | 9 | #define MENUOBJECTCOUNT 10 |
| el15as | 4:1f7f32f3e017 | 10 | |
| el15as | 4:1f7f32f3e017 | 11 | class GameObject |
| el15as | 4:1f7f32f3e017 | 12 | { |
| el15as | 4:1f7f32f3e017 | 13 | |
| el15as | 4:1f7f32f3e017 | 14 | public: |
| el15as | 4:1f7f32f3e017 | 15 | |
| el15as | 4:1f7f32f3e017 | 16 | GameObject(); |
| el15as | 4:1f7f32f3e017 | 17 | ~GameObject(); |
| el15as | 4:1f7f32f3e017 | 18 | |
| el15as | 8:c3cf8d1057bb | 19 | int type; // 0 - Platform, 1 - Horizontal Spikes, 2 - Vertical Spikes, 3 - Door, 4 - Switch, 5 - Uncollected Coin, 6 - Collected Coin, 7 - Menu Box |
| el15as | 5:158e2951654b | 20 | intVector2D position; // Top-left corner of the cube |
| el15as | 4:1f7f32f3e017 | 21 | int width; |
| el15as | 4:1f7f32f3e017 | 22 | int height; |
| el15as | 4:1f7f32f3e017 | 23 | |
| el15as | 4:1f7f32f3e017 | 24 | bool containsPoint(int x, int y); |
| el15as | 4:1f7f32f3e017 | 25 | |
| el15as | 4:1f7f32f3e017 | 26 | private: |
| el15as | 4:1f7f32f3e017 | 27 | |
| el15as | 4:1f7f32f3e017 | 28 | bool containsX(int _x); |
| el15as | 4:1f7f32f3e017 | 29 | bool containsY(int _y); |
| el15as | 4:1f7f32f3e017 | 30 | |
| el15as | 4:1f7f32f3e017 | 31 | }; |
| el15as | 6:33fd1797beb4 | 32 | #endif |