projects
/
ghostsoverboard
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Vibration should now only be tried if the app has the resource
[ghostsoverboard]
/
ship.cpp
diff --git
a/ship.cpp
b/ship.cpp
index
8afc2d2
..
6c92db0
100644
(file)
--- a/
ship.cpp
+++ b/
ship.cpp
@@
-38,6
+38,7
@@
Ship::Ship(QList<QPixmap> pixmapList, QGraphicsItem *parent) :
shipImages_ = pixmapList;
ghostsAboard_ = 0;
vibrationActive_ = false;
shipImages_ = pixmapList;
ghostsAboard_ = 0;
vibrationActive_ = false;
+ vibrationAllowed_ = false;
}
bool Ship::handleCollisions()
}
bool Ship::handleCollisions()
@@
-98,7
+99,7
@@
void Ship::dropAllGhosts()
//vibrate
//vibrate
- if (vibrationActive_)
+ if (vibrationActive_ && vibrationAllowed_)
{
// This is for fremantle
{
// This is for fremantle
@@
-129,3
+130,13
@@
void Ship::setVibrationActivate(bool on)
{
vibrationActive_ = on;
}
{
vibrationActive_ = on;
}
+
+void Ship::allowVibration()
+{
+ vibrationAllowed_ = true;
+}
+
+void Ship::disallowVibration()
+{
+ vibrationAllowed_ = false;
+}