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
Diff: TanksEngine/TanksEngine.h
- Revision:
- 13:feadff02d3f7
- Parent:
- 12:9e6d5d0a0c82
- Child:
- 14:fe2e16cdf219
diff -r 9e6d5d0a0c82 -r feadff02d3f7 TanksEngine/TanksEngine.h --- a/TanksEngine/TanksEngine.h Sun Apr 14 15:58:12 2019 +0000 +++ b/TanksEngine/TanksEngine.h Wed Apr 17 14:03:14 2019 +0000 @@ -7,6 +7,7 @@ #include "Projectile.h" #include "Tank.h" #include "Graphics.h" +#include "Maps.h" class TanksEngine { @@ -16,9 +17,9 @@ ~TanksEngine(); void initgame(); - void left_tank_turn(Gamepad &pad); - void right_tank_turn(Gamepad &pad); - void projectile_phase(); + void left_tank_turn(Graphics &graphics, Gamepad &pad); + void right_tank_turn(Graphics &graphics, Gamepad &pad); + void projectile_phase(N5110 &lcd); void read_input(Gamepad &pad); void render(Graphics graphics, N5110 &lcd); int get_turn(); @@ -29,6 +30,9 @@ void _left_tank_shoots(); void _right_tank_shoots(); bool _collision_pl(Tank _tankl, Projectile _proj); + bool _collision_pr(Tank _tankr, Projectile _proj); + bool _collision_pm(N5110 &lcd, Projectile _proj); + void _object_hit(N5110 &lcd); void _change_turn(); void _decrement_cooldowns(); @@ -38,13 +42,15 @@ int _turn_timer; int _move; bool _fire; - float _power; float _angle; - float _mag; + float _vel; + float _grav; + float _wind; Tank _tankl; Tank _tankr; Projectile _proj; + };