ELEC2645 (2018/19) / Mbed 2 deprecated el17aio

Dependencies:   mbed

Weapons/Weapons.h

Committer:
ikenna1
Date:
2019-04-09
Revision:
9:241a1a7d8527
Child:
14:88ca5b1a111a

File content as of revision 9:241a1a7d8527:

#ifndef WEAPONS_H
#define WEAPONS_H

#include "mbed.h"
#include "N5110.h"
#include "Gamepad.h"
#include "Ship.h"

class Weapons
{
    public:
    Weapons();
    ~Weapons();
    
    /* Initialize the class with the ship position */
    void init(int ship_xpos, int ship_ypos, int ship_width);
    
    /* Draw the missle */
    void draw(N5110 &lcd);
    
    /* Gets the projectiles position */
    Vector2D get_pos();
    
    /* Moves the projectile across the screen */
    void update();
    int ship_xpos;
    int ship_ypos;
    int _ship_xpos;
    int _ship_ypos;
    
    /** Set Position
    *
    *   This function is used to set the position of the projectile to a specific coordinate on screen.
    */
    void set_pos(Vector2D p);
    
    private:
    int reset;
    Vector2D _velocity;
    int _size;
    int _x;
    int _y;
    
};
#endif