ELEC2645 (2019/20) / Mbed 2 deprecated ELEC2645_Project_el18jkeo

Dependencies:   mbed

Ship/Ship.h

Committer:
josh_ohara
Date:
2020-03-14
Revision:
2:c2316b659b97
Child:
3:8a140aa1ddcd

File content as of revision 2:c2316b659b97:


#include Pad.h
#include mbed.h
#include N5110.h
#include Gamepad.h

class Ship
{
    
public: 
    void init(int y, int height, int width); //dimensions of the ship without shooter, y position is bottom of the screen
    void draw(N5110 &lcd); //Draws basic rectangle ship
    void get_position(); //Returns position of ship
    void update(Direction d,float mag); //Interface between joystick and ship control
    
private:
    int Height;
    int Width;
    int X;
    int Y; //y value of ship
    int Speed; //speed of ship
};
#endif