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:
- 13:d04a6caba40d
- Parent:
- 12:a1c1991835ca
- Child:
- 14:3361879490b2
--- a/Entity/Player/Player.h Tue Apr 23 22:59:12 2019 +0000
+++ b/Entity/Player/Player.h Wed Apr 24 02:33:33 2019 +0000
@@ -1,6 +1,9 @@
#ifndef PLAYER_H
#define PLAYER_H
#include "Entity.h"
+#include "Bullets.h"
+
+const int bullets_max = 20;
class Player : public Entity {
public:
@@ -10,8 +13,14 @@
// Functions
virtual void move(float, float);
virtual int * get_frame();
- virtual void chkdmg();
void buttons(bool, bool, bool, bool);
+
+ // accessors
+ int get_attack();
+
+ // variables
+ Bullets *bullets_array[bullets_max];
+ bool valid_bullets[bullets_max];
};
const float player_speed = 1.2;