JianWei Lee
/
project_game
Meteor defense project
Spawn/Spawn.h@6:a554424e4517, 2017-03-23 (annotated)
- Committer:
- jasper0712
- Date:
- Thu Mar 23 19:36:33 2017 +0000
- Revision:
- 6:a554424e4517
- Parent:
- 3:6b50fe9d3848
- Child:
- 13:38cbce17d7d7
problem solved : sharing array between classes
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
jasper0712 | 1:f5cda0674f24 | 1 | #ifndef SPAWN_H |
jasper0712 | 1:f5cda0674f24 | 2 | #define SPAWN_H |
jasper0712 | 1:f5cda0674f24 | 3 | |
jasper0712 | 1:f5cda0674f24 | 4 | #include "mbed.h" |
jasper0712 | 1:f5cda0674f24 | 5 | #include "N5110.h" |
jasper0712 | 1:f5cda0674f24 | 6 | #include "Gamepad.h" |
jasper0712 | 1:f5cda0674f24 | 7 | #include "Weapon.h" |
jasper0712 | 1:f5cda0674f24 | 8 | |
jasper0712 | 1:f5cda0674f24 | 9 | //Y rows and X columns |
jasper0712 | 1:f5cda0674f24 | 10 | #define Rows 48 |
jasper0712 | 1:f5cda0674f24 | 11 | #define Cols 84 |
jasper0712 | 1:f5cda0674f24 | 12 | |
jasper0712 | 1:f5cda0674f24 | 13 | class Spawn |
jasper0712 | 1:f5cda0674f24 | 14 | { |
jasper0712 | 1:f5cda0674f24 | 15 | public: |
jasper0712 | 1:f5cda0674f24 | 16 | Spawn(); |
jasper0712 | 1:f5cda0674f24 | 17 | ~Spawn(); |
jasper0712 | 1:f5cda0674f24 | 18 | //spawnHealth |
jasper0712 | 6:a554424e4517 | 19 | void randomizeSpawn(int Arr1[][Rows], int Arr2[][Rows]); |
jasper0712 | 1:f5cda0674f24 | 20 | //spawnSpeed |
jasper0712 | 6:a554424e4517 | 21 | void moveSpawn(int Arr1[][Rows], int Arr2[][Rows]); |
jasper0712 | 1:f5cda0674f24 | 22 | //weaponUsed |
jasper0712 | 1:f5cda0674f24 | 23 | void checkSpawn(N5110 &lcd); |
jasper0712 | 6:a554424e4517 | 24 | void updateSpawn(int Arr1[][Rows], int Arr2[][Rows],N5110 &lcd); |
jasper0712 | 6:a554424e4517 | 25 | |
jasper0712 | 1:f5cda0674f24 | 26 | |
jasper0712 | 1:f5cda0674f24 | 27 | |
jasper0712 | 1:f5cda0674f24 | 28 | private: |
jasper0712 | 1:f5cda0674f24 | 29 | //column and row same as the screen resolution |
jasper0712 | 1:f5cda0674f24 | 30 | |
jasper0712 | 1:f5cda0674f24 | 31 | float speed; |
jasper0712 | 1:f5cda0674f24 | 32 | int stopSpawn; |
jasper0712 | 1:f5cda0674f24 | 33 | }; |
jasper0712 | 1:f5cda0674f24 | 34 | |
jasper0712 | 3:6b50fe9d3848 | 35 | #endif |