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.
Diff: BreakoutEngine/BreakoutEngine.cpp
- Revision:
- 72:7254d2a8a1cd
- Parent:
- 69:db1354676fde
- Child:
- 75:d96b177585aa
--- a/BreakoutEngine/BreakoutEngine.cpp Sun May 05 16:47:19 2019 +0000
+++ b/BreakoutEngine/BreakoutEngine.cpp Sun May 05 17:36:35 2019 +0000
@@ -112,18 +112,20 @@
}
-void BreakoutEngine::read_input(Gamepad &pad, bool x)
+void BreakoutEngine::read_input(Gamepad &pad, bool tilt, float sens)
{
_d = pad.get_direction();
_mag = pad.get_mag();
- if (x == true) {
+ if (tilt == true) {
_p1.set_tilt();
}
else {
_p1.set_joy();
}
+ _p1.set_sens(sens);
+
if (pad.check_event(Gamepad::B_PRESSED) && _cool_time <= 0) { // max of 3 lasers on screen at once
Vector2D p_pos = _p1.get_pos();