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@1:3916f272663e, 2019-04-21 (annotated)
- Committer:
- adat80
- Date:
- Sun Apr 21 19:02:21 2019 +0000
- Revision:
- 1:3916f272663e
- Child:
- 3:97cd7b3d89d0
Program with working spawning of enemies and killing of enemies;
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 | 1:3916f272663e | 19 | private: |
adat80 | 1:3916f272663e | 20 | float _minTimeBetweenSpawns; |
adat80 | 1:3916f272663e | 21 | float _timeIntoLevel; |
adat80 | 1:3916f272663e | 22 | Enemy *_enemies; |
adat80 | 1:3916f272663e | 23 | int _level; |
adat80 | 1:3916f272663e | 24 | }; |
adat80 | 1:3916f272663e | 25 | |
adat80 | 1:3916f272663e | 26 | #endif |