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
Diff: Entity/Player/Player.h
- Revision:
- 30:ec915d24d3e9
- Parent:
- 29:6b8411bb040a
- Child:
- 32:fe6359ef9916
diff -r 6b8411bb040a -r ec915d24d3e9 Entity/Player/Player.h
--- a/Entity/Player/Player.h Sat May 04 15:39:20 2019 +0000
+++ b/Entity/Player/Player.h Sun May 05 18:04:43 2019 +0000
@@ -2,6 +2,7 @@
#define PLAYER_H
#include "Entity.h"
#include "Bullets.h"
+#include "N5110.h"
const int bullets_max = 20;
@@ -16,6 +17,11 @@
const static int invulnerability_period = 50;
int invulnerability_counter;
+ // Private Functions
+ void move_bullets();
+ void move_player(float mapped_x, float mapped_y, int * map, bool * doorways);
+ void increment_frames(float mapped_x, float mapped_y);
+
public:
// Constructors
Player(float pos_x, float pos_y);
@@ -33,6 +39,10 @@
virtual void move(float, float, int * map, bool * doorways);
virtual void take_damage(int damage);
virtual int * get_frame();
+ bool update_bullets(int * map, bool * doorways);
+ void draw(N5110 &lcd);
+ void draw_player(N5110 &lcd);
+ void draw_bullets(N5110 &lcd);
void delete_bullets();
void buttons(bool button_A, bool button_B, bool button_Y, bool button_X);