ELEC2645 (2019/20) / Mbed 2 deprecated ELEC2645_Project_el18jkeo

Dependencies:   mbed

Ship/Ship.h

Committer:
josh_ohara
Date:
2020-05-01
Revision:
20:0b6f1cfc5be6
Parent:
8:86cb9a9f8a73
Child:
21:970807533b10

File content as of revision 20:0b6f1cfc5be6:

#ifndef SHIP_H
#define SHIP_H

#include "mbed.h"
#include "N5110.h"
#include "Gamepad.h"

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

#endif