ELEC2645 (2018/19) / Mbed 2 deprecated el17m2h_public

Dependencies:   mbed

Committer:
el17m2h
Date:
Mon May 06 11:21:39 2019 +0000
Revision:
22:0d2ac98a8b48
Parent:
20:a359092079b0
Child:
24:67dc71a8f009
Re-organized the functions for the engine and the doodler so that the velocity and position of the doodler are changed as separate functions.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
el17m2h 20:a359092079b0 1 #ifndef ENEMY_H
el17m2h 20:a359092079b0 2 #define ENEMY_H
el17m2h 20:a359092079b0 3
el17m2h 20:a359092079b0 4 #include "mbed.h"
el17m2h 20:a359092079b0 5 #include "N5110.h"
el17m2h 20:a359092079b0 6 #include "Gamepad.h"
el17m2h 20:a359092079b0 7 #include "Bullet.h"
el17m2h 20:a359092079b0 8
el17m2h 20:a359092079b0 9 class Enemy{
el17m2h 20:a359092079b0 10 public:
el17m2h 20:a359092079b0 11 Enemy();
el17m2h 20:a359092079b0 12 ~Enemy();
el17m2h 20:a359092079b0 13 void init(float floor_pos_x, float floor_pos_y);
el17m2h 20:a359092079b0 14 void draw(N5110 &lcd);
el17m2h 20:a359092079b0 15 void update(float floor_pos_x, float floor_pos_y);
el17m2h 20:a359092079b0 16 Vector2D get_position();
el17m2h 20:a359092079b0 17 void set_position(Vector2D pos); // mutators
el17m2h 20:a359092079b0 18 void set_score(int score);
el17m2h 20:a359092079b0 19
el17m2h 20:a359092079b0 20 private:
el17m2h 22:0d2ac98a8b48 21 Bullet b;
el17m2h 20:a359092079b0 22 Vector2D _position;
el17m2h 20:a359092079b0 23 float bullet_pos_y;
el17m2h 20:a359092079b0 24 int _radius;
el17m2h 20:a359092079b0 25 };
el17m2h 20:a359092079b0 26 #endif