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 MotionSensor
Entity/Player/Player.h@11:63e54f6e7939, 2019-04-23 (annotated)
- Committer:
- el17sm
- Date:
- Tue Apr 23 03:10:09 2019 +0000
- Revision:
- 11:63e54f6e7939
- Parent:
- 10:1a3499f6b583
- Child:
- 12:a1c1991835ca
Added move checks (for entity to group of entity collision checks);; Added a plausible way to update each entity;
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| el17sm | 10:1a3499f6b583 | 1 | #ifndef PLAYER_H |
| el17sm | 10:1a3499f6b583 | 2 | #define PLAYER_H |
| el17sm | 10:1a3499f6b583 | 3 | #include "Entity.h" |
| el17sm | 10:1a3499f6b583 | 4 | |
| el17sm | 10:1a3499f6b583 | 5 | class Player : public Entity { |
| el17sm | 10:1a3499f6b583 | 6 | public: |
| el17sm | 10:1a3499f6b583 | 7 | // Constructors |
| el17sm | 10:1a3499f6b583 | 8 | Player(float, float); |
| el17sm | 10:1a3499f6b583 | 9 | |
| el17sm | 10:1a3499f6b583 | 10 | // Functions |
| el17sm | 10:1a3499f6b583 | 11 | virtual void move(float, float); |
| el17sm | 10:1a3499f6b583 | 12 | virtual void chkdmg(); |
| el17sm | 10:1a3499f6b583 | 13 | void buttons(bool, bool, bool, bool); |
| el17sm | 10:1a3499f6b583 | 14 | }; |
| el17sm | 10:1a3499f6b583 | 15 | |
| el17sm | 11:63e54f6e7939 | 16 | const float player_speed = 1.2; |
| el17sm | 11:63e54f6e7939 | 17 | |
| el17sm | 10:1a3499f6b583 | 18 | #endif |