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
Projectile/Projectile.h
- Committer:
- el17mcd
- Date:
- 2019-04-14
- Revision:
- 12:9e6d5d0a0c82
- Parent:
- 11:4e2eb64031a0
- Child:
- 16:a2c945279b79
File content as of revision 12:9e6d5d0a0c82:
#ifndef PROJECTILE_H
#define PROJECTILE_H
#include "mbed.h"
#include "N5110.h"
#include "Gamepad.h"
class Projectile
{
public:
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:
int _position_x;
int _position_y;
int _hitbox[5];
int _init_x;
int _init_y;
float _time;
float _lnch_ang;
float _init_vel; //1.3
float _grav_acc; //0.02
float _wind_acc;
};
#endif // PROJECTILE_H