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
spaceship/spaceship.h
- Committer:
- fy14lkaa
- Date:
- 2019-05-05
- Revision:
- 104:fe20457ef1a9
- Parent:
- 103:cb05154d5025
File content as of revision 104:fe20457ef1a9:
#ifndef SPACESHIP_H #define SPACESHIP_H #include "mbed.h" #include "N5110.h" #include "Gamepad.h" #include "Alien.h" #include "Bullet.h" /*int spaceship_2[10][12]= { {0,0,0,0,0,0,0,0,0,0,0,0}, {0,0,0,1,1,0,0,0,0,0,0,0}, {0,0,0,1,1,0,0,0,0,0,0,0}, {0,1,1,1,1,1,1,1,0,0,0,0}, {0,1,1,1,1,1,1,1,1,0,0,0}, {0,1,1,1,1,1,1,1,1,1,1,0}, {0,1,1,1,1,1,1,1,1,0,0,0}, {0,1,1,1,1,1,1,1,0,0,0,0}, {0,0,0,1,1,0,0,0,0,0,0,0}, {0,0,0,1,1,0,0,0,0,0,0,0}, }; */ class Spaceship { public: Spaceship(); ~Spaceship(); void init(int x_spaceship,int y_spaceship, int speed_spaceship); void draw(N5110 &lcd); void update(Direction d,float mag); void set_pos(int x, int y); int get_pos_y(); int get_pos_x(); //void read_input(Gamepad &pad); //void add_score(); //int get_score(); private: int _x_spaceship; int _y_spaceship; int _speed_spaceship; //int _score; Direction d; float mag; }; #endif