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-18
- Revision:
- 26:a53d41adf40b
- Parent:
- 24:ab821bfeb383
- Child:
- 40:90c7a893d513
File content as of revision 26:a53d41adf40b:
#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(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: int reset; Vector2D _velocity; int _size; int _x; int _y; }; #endif