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.
Dependencies: mbed
CrossyChicken/CrossyChicken.h@13:cd6d2f999057, 2020-05-13 (annotated)
- Committer:
- el19tb
- Date:
- Wed May 13 03:59:27 2020 +0000
- Revision:
- 13:cd6d2f999057
- Parent:
- 11:cc5861abfca5
- Child:
- 15:b15bf9357cd9
the sprites appear to the screen, updated GraphicEngine
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
el19tb | 2:86cef2afa648 | 1 | #ifndef CROSSYCHICKEN_H |
el19tb | 2:86cef2afa648 | 2 | #define CROSSYCHICKEN_H |
el19tb | 3:648c9d5001be | 3 | |
el19tb | 2:86cef2afa648 | 4 | #include "mbed.h" |
el19tb | 2:86cef2afa648 | 5 | #include "N5110.h" |
el19tb | 2:86cef2afa648 | 6 | #include "Gamepad.h" |
el19tb | 3:648c9d5001be | 7 | #include "Chicken.h" |
el19tb | 3:648c9d5001be | 8 | #include "Car.h" |
el19tb | 11:cc5861abfca5 | 9 | #include "Level.h" |
el19tb | 13:cd6d2f999057 | 10 | #include "Vehicle.h" |
el19tb | 13:cd6d2f999057 | 11 | |
el19tb | 4:aae7f8d4ab78 | 12 | #include <vector> |
el19tb | 2:86cef2afa648 | 13 | |
el19tb | 2:86cef2afa648 | 14 | struct Input{ |
el19tb | 2:86cef2afa648 | 15 | //UP, |
el19tb | 2:86cef2afa648 | 16 | //DOWN, |
el19tb | 2:86cef2afa648 | 17 | //LEFT, |
el19tb | 2:86cef2afa648 | 18 | //RIGHT |
el19tb | 2:86cef2afa648 | 19 | }; |
el19tb | 2:86cef2afa648 | 20 | |
el19tb | 2:86cef2afa648 | 21 | class CrossyChicken { |
el19tb | 11:cc5861abfca5 | 22 | public: |
el19tb | 11:cc5861abfca5 | 23 | |
el19tb | 11:cc5861abfca5 | 24 | Level *local_level; |
el19tb | 13:cd6d2f999057 | 25 | CrossyChicken(Level *level); |
el19tb | 11:cc5861abfca5 | 26 | |
el19tb | 2:86cef2afa648 | 27 | public: |
el19tb | 2:86cef2afa648 | 28 | void start(); |
el19tb | 2:86cef2afa648 | 29 | void input(); |
el19tb | 2:86cef2afa648 | 30 | void process_input(); |
el19tb | 2:86cef2afa648 | 31 | void clear(); |
el19tb | 2:86cef2afa648 | 32 | |
el19tb | 2:86cef2afa648 | 33 | void game(); |
el19tb | 2:86cef2afa648 | 34 | void refresh(); |
el19tb | 3:648c9d5001be | 35 | |
el19tb | 3:648c9d5001be | 36 | void moveChicken(int xWay, int yWay); |
el19tb | 3:648c9d5001be | 37 | |
el19tb | 5:6e3afee7eac3 | 38 | void moveCar(Car *car, int dir, int x); |
el19tb | 3:648c9d5001be | 39 | void move(); |
el19tb | 3:648c9d5001be | 40 | |
el19tb | 3:648c9d5001be | 41 | void setup(); |
el19tb | 8:52794de935b2 | 42 | void setCollision(Car* object); |
el19tb | 8:52794de935b2 | 43 | void frogOnLog(Car* car); |
el19tb | 8:52794de935b2 | 44 | bool returnCollision(Car* log); |
el19tb | 4:aae7f8d4ab78 | 45 | |
el19tb | 3:648c9d5001be | 46 | private: |
el19tb | 2:86cef2afa648 | 47 | }; |
el19tb | 2:86cef2afa648 | 48 | |
el19tb | 2:86cef2afa648 | 49 | |
el19tb | 2:86cef2afa648 | 50 | #endif |
el19tb | 2:86cef2afa648 | 51 | |
el19tb | 2:86cef2afa648 | 52 | |
el19tb | 2:86cef2afa648 | 53 |