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-05-08
- Revision:
- 42:ee13e1d103d8
- Parent:
- 40:90c7a893d513
File content as of revision 42:ee13e1d103d8:
#ifndef WEAPONS_H #define WEAPONS_H #include "mbed.h" #include "N5110.h" #include "Gamepad.h" #include "Ship.h" #include "Enemy.h" class Weapons { public: Weapons(); ~Weapons(); /* Initialize the class with the ship position */ void init(int ship_xpos, int ship_ypos, int ship_width,N5110 *lcd, Gamepad *pad); /* Draw the missle */ void draw(int shipno,Vector2D closest); /* Gets the projectiles position */ Vector2D get_pos(int shipno); /* 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(int xpos, int ypos); private: Gamepad *_pad; N5110 *_lcd; Enemy _enemy; int reset; Vector2D _velocity; int _size; int _x; int _y; }; #endif