ELEC2645 (2019/20) / Mbed 2 deprecated ELEC2645_Project_el19zf

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