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
Collision/Collision.h
- Committer:
- el19zf
- Date:
- 2020-04-29
- Revision:
- 8:8287d2ef965d
- Parent:
- 6:dce38fe4e092
- Child:
- 11:494cc44777fe
File content as of revision 8:8287d2ef965d:
#ifndef COLLISION_H
#define COLLISION_H
#include "mbed.h"
#include "Gamepad.h"
#include "N5110.h"
#include "PeopleEngine.h"
#include "shot.h"
/** Collision class
@check whether people is shotted
@author Zeyu Feng
@28 April 2020
*/
class Collision{
public:
Collision();//constructor
~Collision();//destructor
//init
void init();
//check whether there is a collision
bool check(N5110 &lcd);
void draw(N5110 &lcd);
//get health of people
int get_health();
//accessors
void set_pos(Vector2D pos);
private:
int _health;
int _check_index;
Vector2D _people_pos;//starting coordinate
};
#endif