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
Diff: Projectile/Projectile.h
- Revision:
- 16:a2c945279b79
- Parent:
- 12:9e6d5d0a0c82
- Child:
- 17:cb39d9fa08dc
--- a/Projectile/Projectile.h Fri Apr 19 15:58:51 2019 +0000
+++ b/Projectile/Projectile.h Wed Apr 24 13:44:12 2019 +0000
@@ -8,16 +8,22 @@
class Projectile
{
+
public:
+ Projectile();
+ ~Projectile();
+
+ // Accessors
+ int get_position_x();
+ int get_position_y();
+ int get_hitbox(int i);
+ // Mutators
+ void set_launch_parameters(int x, int y, float ang, float vel, float grav, float wind);
+ // Other Methods
void generate_hitbox();
void update_flight();
bool check_boundaries();
- void set_position(int x, int y);
- void set_launch_parameters(int x, int y, float ang, float vel, float grav, float wind);
- int get_position_x();
- int get_position_y();
- int get_hitbox(int i);
private:
@@ -28,8 +34,8 @@
int _init_y;
float _time;
float _lnch_ang;
- float _init_vel; //1.3
- float _grav_acc; //0.02
+ float _init_vel;
+ float _grav_acc;
float _wind_acc;
};