ELEC2645 (2019/20) / Mbed 2 deprecated ELEC2645_Project_el18jkeo

Dependencies:   mbed

Committer:
josh_ohara
Date:
Sat Mar 14 21:19:58 2020 +0000
Revision:
3:8a140aa1ddcd
Parent:
2:c2316b659b97
Child:
4:18a1fc4c38e0
Some debugging done. Questions for class written.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
josh_ohara 2:c2316b659b97 1
josh_ohara 3:8a140aa1ddcd 2 #include "mbed.h"
josh_ohara 3:8a140aa1ddcd 3 #include "N5110.h"
josh_ohara 3:8a140aa1ddcd 4 #include "Gamepad.h"
josh_ohara 2:c2316b659b97 5
josh_ohara 2:c2316b659b97 6 class Ship
josh_ohara 2:c2316b659b97 7 {
josh_ohara 2:c2316b659b97 8
josh_ohara 2:c2316b659b97 9 public:
josh_ohara 2:c2316b659b97 10 void init(int y, int height, int width); //dimensions of the ship without shooter, y position is bottom of the screen
josh_ohara 2:c2316b659b97 11 void draw(N5110 &lcd); //Draws basic rectangle ship
josh_ohara 3:8a140aa1ddcd 12 Vector2D get_position(); //Returns position of ship
josh_ohara 2:c2316b659b97 13 void update(Direction d,float mag); //Interface between joystick and ship control
josh_ohara 3:8a140aa1ddcd 14 int get_height();
josh_ohara 3:8a140aa1ddcd 15 int get_width();
josh_ohara 2:c2316b659b97 16
josh_ohara 2:c2316b659b97 17 private:
josh_ohara 2:c2316b659b97 18 int Height;
josh_ohara 2:c2316b659b97 19 int Width;
josh_ohara 2:c2316b659b97 20 int X;
josh_ohara 2:c2316b659b97 21 int Y; //y value of ship
josh_ohara 2:c2316b659b97 22 int Speed; //speed of ship
josh_ohara 2:c2316b659b97 23 };