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.
Diff: Invaders/Invader.h
- Revision:
- 4:c644522ff9d9
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Invaders/Invader.h Fri Apr 10 14:28:25 2020 +0000 @@ -0,0 +1,49 @@ +#ifndef INVADER_H +#define INVADER_H + +#include "mbed.h" +#include "N5110.h" +#include "Gamepad.h" + +/** Invader.h +* @brief Defines variables and methods for the Invader. +* @author Helios A. Lyons +* @date April, 2020 +*/ + +class Invader +{ +public: + + Invader(); + ~Invader(); + + void init(int sprite, int hitpoints); + void draw(N5110 &lcd); + + //void set_hitpoints(int hitpoints); + + //int get_hitpoints(); + + int hit(); + + //void set_death(bool death); + + bool get_death(); + + // void set_sprite(int sprite); + + Vector2D get_pos(); + +private: + + int _height; + int _width; + int _x; + int _y; + int _hitpoints; + bool _death; + int _sprite; + +}; +#endif \ No newline at end of file