Prints objects on to a Nokia N5110 LCD display and makes them 'fall' down the display.
Dependents: Game_Controller_Project
Objects.h@7:e567cd172d2a, 2017-04-12 (annotated)
- Committer:
- Nathanj94
- Date:
- Wed Apr 12 14:45:05 2017 +0000
- Revision:
- 7:e567cd172d2a
- Parent:
- 5:217e18adcba7
- Child:
- 8:27e7d776ac0b
No changes;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Nathanj94 | 0:a1d36c50a0b7 | 1 | #ifndef OBJECTS_H |
Nathanj94 | 0:a1d36c50a0b7 | 2 | #define OBJECTS_H |
Nathanj94 | 0:a1d36c50a0b7 | 3 | |
Nathanj94 | 0:a1d36c50a0b7 | 4 | #include "mbed.h" |
Nathanj94 | 1:a05d10d3d33f | 5 | #include "N5110.h" |
Nathanj94 | 0:a1d36c50a0b7 | 6 | #include "Gamepad.h" |
Nathanj94 | 0:a1d36c50a0b7 | 7 | #include "Basket.h" |
Nathanj94 | 4:56ca80919a98 | 8 | #include "Fruit.h" |
Nathanj94 | 0:a1d36c50a0b7 | 9 | |
Nathanj94 | 0:a1d36c50a0b7 | 10 | class Objects |
Nathanj94 | 0:a1d36c50a0b7 | 11 | { |
Nathanj94 | 0:a1d36c50a0b7 | 12 | public: |
Nathanj94 | 0:a1d36c50a0b7 | 13 | |
Nathanj94 | 0:a1d36c50a0b7 | 14 | Objects(); |
Nathanj94 | 0:a1d36c50a0b7 | 15 | ~Objects(); |
Nathanj94 | 3:0c79211fdfe0 | 16 | void init(int speed); |
Nathanj94 | 3:0c79211fdfe0 | 17 | void draw(N5110 &lcd); |
Nathanj94 | 3:0c79211fdfe0 | 18 | void undraw(N5110 &lcd); |
Nathanj94 | 3:0c79211fdfe0 | 19 | void move(); |
Nathanj94 | 5:217e18adcba7 | 20 | int get_score_var(); |
Nathanj94 | 7:e567cd172d2a | 21 | int get_undraw_var(); |
Nathanj94 | 3:0c79211fdfe0 | 22 | int get_x(); |
Nathanj94 | 3:0c79211fdfe0 | 23 | int get_y(); |
Nathanj94 | 1:a05d10d3d33f | 24 | |
Nathanj94 | 1:a05d10d3d33f | 25 | private: |
Nathanj94 | 1:a05d10d3d33f | 26 | |
Nathanj94 | 4:56ca80919a98 | 27 | Fruit fruit; |
Nathanj94 | 4:56ca80919a98 | 28 | |
Nathanj94 | 5:217e18adcba7 | 29 | int score_var; |
Nathanj94 | 4:56ca80919a98 | 30 | int undraw_var; |
Nathanj94 | 2:3f42da6a4c89 | 31 | int objects_size; |
Nathanj94 | 3:0c79211fdfe0 | 32 | int x_ref; |
Nathanj94 | 3:0c79211fdfe0 | 33 | int y_ref; |
Nathanj94 | 2:3f42da6a4c89 | 34 | int objects_ep; |
Nathanj94 | 2:3f42da6a4c89 | 35 | int objects_speed; |
Nathanj94 | 4:56ca80919a98 | 36 | int objects_shape; |
Nathanj94 | 4:56ca80919a98 | 37 | |
Nathanj94 | 1:a05d10d3d33f | 38 | }; |
Nathanj94 | 1:a05d10d3d33f | 39 | #endif |