Initial publish
Dependencies: mbed
Fork of el17dg by
game/gameobject.h@27:f05f4e738ba9, 2019-04-08 (annotated)
- Committer:
- Noximilien
- Date:
- Mon Apr 08 14:41:57 2019 +0000
- Revision:
- 27:f05f4e738ba9
- Parent:
- 26:676874c42883
- Child:
- 28:35af3843de8f
I have created "press START" for the intro pause. Added more comments for the report. Fixed the bug I had in my small star function. Changed some drawsprite functions to new one I made. Slightly simplified the code.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Noximilien | 21:0eb394495b8a | 1 | #ifndef GAMEOBJECT_H |
Noximilien | 21:0eb394495b8a | 2 | #define GAMEOBJECT_H |
Noximilien | 21:0eb394495b8a | 3 | |
Noximilien | 21:0eb394495b8a | 4 | #include "geometry.h" |
Noximilien | 21:0eb394495b8a | 5 | |
Noximilien | 21:0eb394495b8a | 6 | |
Noximilien | 21:0eb394495b8a | 7 | class GameObject { |
Noximilien | 21:0eb394495b8a | 8 | public: |
Noximilien | 27:f05f4e738ba9 | 9 | /**This function assigns the position to the obejsts (sprites) |
Noximilien | 26:676874c42883 | 10 | */ |
Noximilien | 21:0eb394495b8a | 11 | void spawn(Point spawn_pos) { |
Noximilien | 21:0eb394495b8a | 12 | pos = spawn_pos; |
Noximilien | 21:0eb394495b8a | 13 | active = true; |
Noximilien | 21:0eb394495b8a | 14 | } |
Noximilien | 21:0eb394495b8a | 15 | Point pos; |
Noximilien | 21:0eb394495b8a | 16 | bool active; |
Noximilien | 21:0eb394495b8a | 17 | }; |
Noximilien | 21:0eb394495b8a | 18 | |
Noximilien | 21:0eb394495b8a | 19 | #endif |