obstacles for the map
Embed:
(wiki syntax)
Show/hide line numbers
Wall.h
00001 #ifndef Wall_H 00002 #define Wall_H 00003 00004 #include "mbed.h" 00005 #include "N5110.h" 00006 #include "Gamepad.h" 00007 00008 /** Column.h 00009 @brief This library handles a rectangular type of obstacle. 00010 */ 00011 00012 class Wall 00013 { 00014 private: 00015 00016 // Variables 00017 int _posX; 00018 int _posY; 00019 int _heigth; 00020 int _width; 00021 int _scenePosX; 00022 int _scenePosY; 00023 00024 public: 00025 00026 /** 00027 * Class constructor 00028 */ 00029 Wall(); 00030 00031 /** 00032 * Class destructor 00033 */ 00034 ~Wall(); 00035 00036 /** 00037 * Getter for the the absolute X cohordinate 00038 */ 00039 int getPosX(); 00040 00041 /** 00042 * Getter for the the absolute Y cohordinate 00043 */ 00044 int getPosY(); 00045 00046 /** 00047 * Getter for the the heigth of the wall object 00048 */ 00049 int getHeigth(); 00050 00051 /** 00052 * Getter for the the width of the wall object 00053 */ 00054 int getWidth(); 00055 00056 /** 00057 * Getter for the the X cohordinate relative to the screen 00058 */ 00059 int getScenePosX(); 00060 00061 /** 00062 * Getter for the the Y cohordinate relative to the screen 00063 */ 00064 int getScenePosY(); 00065 00066 /** Setter for the the X cohordinate relative to the screen 00067 * 00068 * @param x X cohordinate relative to the screens 00069 * 00070 */ 00071 void setScenePosX(int x); 00072 00073 /** Setter for the the Y cohordinate relative to the screen 00074 * 00075 * @param y Y cohordinate relative to the screens 00076 * 00077 */ 00078 void setScenePosY(int y); 00079 00080 /** initialise the wall object 00081 * 00082 * @param x Absolute X cohordinate 00083 * @param y Absolute y cohordinate 00084 * @param heigth Heigth of the wall object 00085 * @param width Width of the wall object 00086 * 00087 */ 00088 void init(int x, 00089 int y, 00090 int heigth, 00091 int width); 00092 00093 /** Render the wall object on the screen 00094 * 00095 * @param lcd Display used to render the wall 00096 * 00097 */ 00098 void draw(N5110 &lcd); 00099 }; 00100 00101 #endif
Generated on Sun Jul 31 2022 04:53:13 by
1.7.2