Ben Evans / Mbed 2 deprecated Defender_Game

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers CheckCollision.h Source File

CheckCollision.h

00001 #ifndef CHECKCOLLISION_H
00002 #define CHECKCOLLISION_H
00003 
00004 // Included Headers ------------------------------------------------------------
00005 #include "mbed.h"
00006 #include "Position.h"
00007 #include "Weapons.h"
00008 
00009 /** CheckCollision class
00010 * @brief Check Collision perant class
00011 * @author Benjamin Evans, University of Leeds
00012 * @date May 2020
00013 */         
00014 class CheckCollision: virtual public Position{    
00015     public: 
00016     // Function prototypes -----------------------------------------------------
00017     
00018         /** Checks if bullet collides with a sprite
00019          * @param bullet @details Weapons object
00020          */
00021         bool check_collision(Weapons bullet); 
00022         
00023     protected:    
00024     // Variables ---------------------------------------------------------------
00025         
00026         /** Length of sprite in x direction */
00027         int sprite_x_length; 
00028         
00029         /** Length of sprite in y direction */
00030         int sprite_y_length; 
00031         
00032 };
00033  
00034 #endif