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
Diff: Enemy/Enemy.h
- Revision:
- 3:97cd7b3d89d0
- Parent:
- 2:88019d96e1da
- Child:
- 5:8bd09c675f28
--- a/Enemy/Enemy.h Wed Apr 24 12:38:53 2019 +0000
+++ b/Enemy/Enemy.h Sun Apr 28 16:55:24 2019 +0000
@@ -29,7 +29,7 @@
Action enemAction;
- void init(float timeToAttack);
+ void init(float timeToAttack, float speed);
void draw(N5110 &lcd);
void update(int fps);
/// accessors and mutators
@@ -42,6 +42,7 @@
void set_current_action(Action act);
+ Action get_current_action();
void set_alive(bool alive);
bool get_alive();
@@ -51,12 +52,13 @@
private:
- int _x;
- int _y;
+ float _x;
+ float _y;
bool _attack;
bool _alive;
float _timeToAttack;
+ float _speed;
float _animationTick;
Action currentAction;