Harry Rance 200925395 Embedded Systems Project

Dependencies:   mbed

Bullet.h

Committer:
harryrance
Date:
2017-04-13
Revision:
1:95d7dd44bb0d
Child:
2:50feb42b982c

File content as of revision 1:95d7dd44bb0d:

#ifndef BULLET_H
#define BULLET_H

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

class Bullet
{

public:
  Bullet();
  ~Bullet();
  void initialise(int x_origin, int y_origin, int speed, int button_check);
  void draw(N5110 &lcd);
  void update();
  void check_button_press(Gamepad &pad);

  void set_velocity(Vector2D v);
  void set_position(Vector2D p);
  Vector2D get_velocity();
  Vector2D get_position();

private:

  UserShip _get_ship;
  Vector2D _velocity;
  int _button_check;
  int _x_origin;
  int _y_origin;
  int _speed;
  int _x;
  int _y;

};

#endif