Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Weapons/Weapons.h
- Committer:
- ikenna1
- Date:
- 2019-04-14
- Revision:
- 23:0301effce801
- Parent:
- 22:8cad70085883
- Child:
- 24:ab821bfeb383
File content as of revision 23:0301effce801:
#ifndef WEAPONS_H #define WEAPONS_H #include "mbed.h" #include "N5110.h" #include "Gamepad.h" #include "Ship.h" class Weapons { public: Weapons(); ~Weapons(); /* Initialize the class with the ship position */ void init(int ship_xpos, int ship_ypos, int ship_width); /* Draw the missle */ void draw(N5110 &lcd,Gamepad &pad, int shipno); /* Gets the projectiles position */ Vector2D get_pos(); /* Moves the projectile across the screen */ void update(); int ship_xpos; int ship_ypos; int _ship_xpos; int _ship_ypos; /** Set Position * * This function is used to set the position of the projectile to a specific coordinate on screen. */ void set_pos(Vector2D p); private: int reset; Vector2D _velocity; int _size; int _x; int _y; }; #endif