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.
missile/missile.h
- Committer:
- godv
- Date:
- 2020-04-29
- Revision:
- 2:fe4b9d530a8b
File content as of revision 2:fe4b9d530a8b:
#ifndef MISSILE_H #define MISSILE_H #include "mbed.h" #include "N5110.h" #include "Gamepad.h" #include "robot.h" /** missie Class * @brief missile * @author Gao Dawei * @date 27/4/2020 */ class missile { public: /** Constructor */ missile(); /** Destructor */ ~missile(); /** Initialization */ void init(int height,int width,int speed); /** draw pattern on lcd*/ void draw(N5110 &lcd); /** Update the values */ void update(); /// accessors and mutators /**Set velocity */ void set_velocity(Vector2D v); /**get velocity */ Vector2D get_velocity(); /**get position */ Vector2D get_pos(); /**Set position */ void set_pos(Vector2D p); private: Vector2D _velocity; robot _robot; int _height; int _width; int _x; int _y; }; #endif