Ben Evans / Mbed 2 deprecated Defender_Game

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Position.h Source File

Position.h

00001 #ifndef POSITION_H
00002 #define POSITION_H
00003 
00004 // Included Headers ------------------------------------------------------------
00005 #include "mbed.h"
00006 #include "Gamepad.h"
00007 
00008 /** Position class
00009 * @brief Position parent class
00010 * @author Benjamin Evans, University of Leeds
00011 * @date May 2020
00012 */         
00013 class Position { 
00014     public:
00015     // Function prototypes -----------------------------------------------------
00016     
00017         /** Gets the xy position of the sprite
00018          * @return position_x_
00019          * @return position_x_
00020          */
00021         Vector2D get_pos();
00022     
00023     protected:   
00024     // Variables ---------------------------------------------------------------- 
00025         
00026         /** X position on lcd */
00027         int position_x_; 
00028         
00029         /** Y position on lcd */     
00030         int position_y_; 
00031         
00032         /** Movement direction 
00033          * @note true = East, false = West 
00034          */
00035         bool direction_; 
00036 };
00037  
00038 #endif