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
EnemySpawner/EnemySpawner.h@3:97cd7b3d89d0, 2019-04-28 (annotated)
- Committer:
- adat80
- Date:
- Sun Apr 28 16:55:24 2019 +0000
- Revision:
- 3:97cd7b3d89d0
- Parent:
- 1:3916f272663e
- Child:
- 6:f06ce4cf068a
Game menu and loop to re play game
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
adat80 | 1:3916f272663e | 1 | #ifndef ENEMYSPAWNER_H |
adat80 | 1:3916f272663e | 2 | #define ENEMYSPAWNER_H |
adat80 | 1:3916f272663e | 3 | |
adat80 | 1:3916f272663e | 4 | #include "mbed.h" |
adat80 | 1:3916f272663e | 5 | #include "Gamepad.h" |
adat80 | 1:3916f272663e | 6 | #include "Enemy.h" |
adat80 | 1:3916f272663e | 7 | |
adat80 | 1:3916f272663e | 8 | |
adat80 | 1:3916f272663e | 9 | class EnemySpawner |
adat80 | 1:3916f272663e | 10 | { |
adat80 | 1:3916f272663e | 11 | |
adat80 | 1:3916f272663e | 12 | public: |
adat80 | 1:3916f272663e | 13 | EnemySpawner(); |
adat80 | 1:3916f272663e | 14 | ~EnemySpawner(); |
adat80 | 1:3916f272663e | 15 | |
adat80 | 1:3916f272663e | 16 | Enemy* init(int level); |
adat80 | 1:3916f272663e | 17 | void update(int fps); |
adat80 | 1:3916f272663e | 18 | |
adat80 | 3:97cd7b3d89d0 | 19 | void set_number_of_enemies(int enemies); |
adat80 | 3:97cd7b3d89d0 | 20 | int get_number_of_enemies(); |
adat80 | 3:97cd7b3d89d0 | 21 | |
adat80 | 1:3916f272663e | 22 | private: |
adat80 | 1:3916f272663e | 23 | float _minTimeBetweenSpawns; |
adat80 | 1:3916f272663e | 24 | float _timeIntoLevel; |
adat80 | 3:97cd7b3d89d0 | 25 | int _number_of_enemies; |
adat80 | 1:3916f272663e | 26 | Enemy *_enemies; |
adat80 | 1:3916f272663e | 27 | int _level; |
adat80 | 1:3916f272663e | 28 | }; |
adat80 | 1:3916f272663e | 29 | |
adat80 | 1:3916f272663e | 30 | #endif |