Ben Evans / Mbed 2 deprecated Defender_Game

Dependencies:   mbed

Explosion/Explosion.h

Committer:
evanso
Date:
2020-05-13
Revision:
26:1a7056eb3253
Parent:
25:70b55f5bfc87
Child:
27:8bb2bd97c319

File content as of revision 26:1a7056eb3253:

#ifndef EXPLOSION_H
#define EXPLOSION_H

// Included libraries -----------------------------------------------------------
#include "mbed.h"
#include "N5110.h"
#include "Gamepad.h"
#include <vector>

/** Explosion class
@brief Draws explosion animation 
@author Benjamin Evans, University of Leeds
@date May 2020
*/      

// struct to draw explosion animation 
struct Animation{
    bool draw_circle_one; 
    bool draw_circle_two;
    FillType circle_one; 
    FillType circle_two;
};
    

class Explosion {
    public:
        /** Constructor */
        Explosion();
        
        /** Destructor */
        ~Explosion();
        
        /** Initalises explosion */
        void init();
    
        /** Draws the explosion 
         * @param lcd @details : N5110 object
         */
        void draw_explosion(N5110 &lcd);
    
    // Accessors and mutators --------------------------------------------------
        
        /** Set position of the explosion
         * @param destroyed_position @details : xy position of object that was detroyed
         */
        void set_explosion_posistion(Vector2D destroyed_position);
        
        /** Gets the explosion radius
         * @returns explosion_radius_
         */
        int get_explosion_radius();
        
    private:   
       
    // Varibles ---------------------------------------------------------------- 
         
        //Explosion x position on lcd
        int position_x_explosion_;
            
        // Explosion y position on lcd
        int position_y_explosion_;
        
        // Explosion circle radius
        int explosion_radius_;
        
        // FSM counter
        int fsm_counter_;
        
        // Draw cunter 
        int draw_counter;
};
 
#endif