Yudong Xiao
/
pokemon
This is test version of Pokemongo game. ELEC 2645 final project.
pokeball/Pokeball.h@0:819c2d6a69ac, 2021-04-15 (annotated)
- Committer:
- shalwego
- Date:
- Thu Apr 15 15:35:12 2021 +0000
- Revision:
- 0:819c2d6a69ac
Issue about music playing
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
shalwego | 0:819c2d6a69ac | 1 | #ifndef POKEBALL_H |
shalwego | 0:819c2d6a69ac | 2 | #define POKEBALL_H |
shalwego | 0:819c2d6a69ac | 3 | |
shalwego | 0:819c2d6a69ac | 4 | #include "mbed.h" |
shalwego | 0:819c2d6a69ac | 5 | #include "N5110.h" |
shalwego | 0:819c2d6a69ac | 6 | #include "Utils.h" |
shalwego | 0:819c2d6a69ac | 7 | |
shalwego | 0:819c2d6a69ac | 8 | |
shalwego | 0:819c2d6a69ac | 9 | /* |
shalwego | 0:819c2d6a69ac | 10 | initially darw a pokeball on the lcd |
shalwego | 0:819c2d6a69ac | 11 | |
shalwego | 0:819c2d6a69ac | 12 | |
shalwego | 0:819c2d6a69ac | 13 | */ |
shalwego | 0:819c2d6a69ac | 14 | class Pokeball |
shalwego | 0:819c2d6a69ac | 15 | { |
shalwego | 0:819c2d6a69ac | 16 | |
shalwego | 0:819c2d6a69ac | 17 | public: |
shalwego | 0:819c2d6a69ac | 18 | void init(int x, int y, int radius); |
shalwego | 0:819c2d6a69ac | 19 | void draw(N5110 &lcd); |
shalwego | 0:819c2d6a69ac | 20 | void update(UserInput input); |
shalwego | 0:819c2d6a69ac | 21 | int get_score(); |
shalwego | 0:819c2d6a69ac | 22 | void update_vol(); |
shalwego | 0:819c2d6a69ac | 23 | Position2D get_pos(); |
shalwego | 0:819c2d6a69ac | 24 | int get_radius(); |
shalwego | 0:819c2d6a69ac | 25 | void pokemon_caught(); |
shalwego | 0:819c2d6a69ac | 26 | |
shalwego | 0:819c2d6a69ac | 27 | private: |
shalwego | 0:819c2d6a69ac | 28 | int _x, _y, _radius, _speed; |
shalwego | 0:819c2d6a69ac | 29 | Position2D _velocity; |
shalwego | 0:819c2d6a69ac | 30 | }; |
shalwego | 0:819c2d6a69ac | 31 | #endif |