Laila Al Badwawi 200906179 SpaceInvaders I declare this my own independent work and understand the university rules on plagiarism.
Dependencies: mbed
Alien/Alien.h@130:4ce67451d0c1, 2019-05-06 (annotated)
- Committer:
- fy14lkaa
- Date:
- Mon May 06 13:47:06 2019 +0000
- Revision:
- 130:4ce67451d0c1
- Parent:
- 129:a5b90c497f9c
- Child:
- 133:eed60548d170
added printf statement to the spaceship.cpp
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
fy14lkaa | 28:4786e81ce3e3 | 1 | #ifndef Alien_H |
fy14lkaa | 28:4786e81ce3e3 | 2 | #define Alien_H |
fy14lkaa | 28:4786e81ce3e3 | 3 | |
fy14lkaa | 28:4786e81ce3e3 | 4 | |
fy14lkaa | 28:4786e81ce3e3 | 5 | |
fy14lkaa | 28:4786e81ce3e3 | 6 | #include "mbed.h" |
fy14lkaa | 28:4786e81ce3e3 | 7 | #include "Gamepad.h" |
fy14lkaa | 28:4786e81ce3e3 | 8 | #include "N5110.h" |
fy14lkaa | 130:4ce67451d0c1 | 9 | #include "Bullet.h" |
fy14lkaa | 127:8bd8cf136f19 | 10 | |
fy14lkaa | 28:4786e81ce3e3 | 11 | |
fy14lkaa | 28:4786e81ce3e3 | 12 | class Alien |
fy14lkaa | 28:4786e81ce3e3 | 13 | { |
fy14lkaa | 95:1b43f9c332bc | 14 | public: |
fy14lkaa | 95:1b43f9c332bc | 15 | Alien(); |
fy14lkaa | 95:1b43f9c332bc | 16 | ~Alien(); |
fy14lkaa | 95:1b43f9c332bc | 17 | |
fy14lkaa | 95:1b43f9c332bc | 18 | |
fy14lkaa | 95:1b43f9c332bc | 19 | void init(int x_alien,int y_alien, int speed_alien); |
fy14lkaa | 28:4786e81ce3e3 | 20 | void draw(N5110 &lcd); |
fy14lkaa | 95:1b43f9c332bc | 21 | void update(Direction d,float mag); |
fy14lkaa | 92:8a1b14488ca5 | 22 | |
fy14lkaa | 28:4786e81ce3e3 | 23 | private: |
fy14lkaa | 92:8a1b14488ca5 | 24 | |
fy14lkaa | 92:8a1b14488ca5 | 25 | |
fy14lkaa | 95:1b43f9c332bc | 26 | int _x_alien; |
fy14lkaa | 95:1b43f9c332bc | 27 | //int _alien[12][10]; |
fy14lkaa | 95:1b43f9c332bc | 28 | int _y_alien; |
fy14lkaa | 95:1b43f9c332bc | 29 | int _speed_alien; |
fy14lkaa | 130:4ce67451d0c1 | 30 | //int _hit_enemy; |
fy14lkaa | 95:1b43f9c332bc | 31 | Direction d; |
fy14lkaa | 95:1b43f9c332bc | 32 | float mag; |
fy14lkaa | 28:4786e81ce3e3 | 33 | }; |
fy14lkaa | 28:4786e81ce3e3 | 34 | #endif |