Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
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
Generated on Fri Aug 5 2022 06:55:07 by
1.7.2