Game codes for Pokemon Academy Yiu Fai Kwok - 201198802 I have read the University Regulations on Plagiarism and state that the work covered by this declaration is my own and does not contain any unacknowledged work from other sources.
Dependencies: mbed FXOS8700CQ mbed-rtos
Game_one/Object_files/Object.h
- Committer:
- yfkwok
- Date:
- 2019-04-20
- Revision:
- 16:4e49f5cb972e
- Parent:
- 2:464c7e62d97d
- Child:
- 17:5d8ff39a0e49
File content as of revision 16:4e49f5cb972e:
#ifndef OBJECT_H #define OBJECT_H #include "mbed.h" #include "N5110.h" #include "Gamepad.h" /** Object Class * @author Yiu Fai Kwok, University of Leeds * @brief Define the properties of the blocks in Game_1 * @date 25/03/2019 */ class Object { public: /** Constructor */ Object(); /** Deconstructor */ ~Object(); /** * @brief Initialize the class parameters * @param speed * @details Initialize the object's position and speed */ void init(int speed); /** * @brief Draw the object - block in Game 1 * @details Draw the block on lcd screen */ void draw(N5110 &lcd); /** * @brief Update the block * @details Update the block position */ void update(); // accessors and mutators /** * @brief Set the speed * @param speed * @details Set the speed of the block according to the level of difficulty determined by year */ void set_velocity(int speed); /** * @brief Get the speed * @details Return the speed of the block */ int get_velocity(); /** * @brief Get the position * @details Return the position of the block */ Vector2D get_pos(); /** * @brief Set the position * @details Set the position of the block */ void set_pos(Vector2D p); private: int _speed; int _x; int _y; }; #endif