Laila Al Badwawi 200906179 SpaceInvaders I declare this my own independent work and understand the university rules on plagiarism.
Dependencies: mbed
Spaceship/Spaceship.cpp
- Committer:
- fy14lkaa
- Date:
- 2019-05-05
- Revision:
- 108:ca888bb3ed54
- Parent:
- 107:83b0bc100600
- Child:
- 109:2137a6a63840
File content as of revision 108:ca888bb3ed54:
#include "Spaceship.h" Spaceship::Spaceship() { } Spaceship::~Spaceship() { } void Spaceship::init(int x_spaceship,int y_spaceship, int speed_spaceship) { _x_spaceship= x_spaceship; _y_spaceship= y_spaceship; _speed_spaceship= speed_spaceship; } void Spaceship::draw(N5110 &lcd) { lcd.drawRect(_x_spaceship,_y_spaceship,_x_spaceship+5,_y_spaceship+10,FILL_BLACK); //lcd.drawSprite(_x_spaceship,_y_spaceship,10,12,(int *) spaceship_2); } void Spaceship::update(Direction d,float mag) { _speed_spaceship = int(mag*10.0f); }