ELEC2645 (2019/20) / Mbed 2 deprecated ELEC2645_Project_el19zf

Dependencies:   mbed

shot/shot.h

Committer:
el19zf
Date:
2020-04-29
Revision:
7:c49f3d3b672f
Parent:
6:dce38fe4e092
Child:
8:8287d2ef965d

File content as of revision 7:c49f3d3b672f:

#ifndef SHOT_H
#define SHOT_H

#include "mbed.h"
#include "Gamepad.h"
#include "N5110.h"
#include <vector>
#include <time.h>
#include <stdlib.h>

/** shot class
    @set several kinds of shot and come from all around
    @author Zeyu Feng
    @13 April 2020
   */




struct shot_posandtype {
    int x;
    int y;
    int type;
    int dir;
};

class shot
{

public:
    //constructor
    shot();
    //destructor
    ~shot();

    void init();

    void init_pos(shot_posandtype* i);

    void gen_shot();

    void update();

    void draw(N5110 &lcd);

    void delete_shot();

    int _size;//use for resize number of vector

private:

    std::vector<shot_posandtype> _p;
    
};
#endif