void CandyBoss::dealDamage(float amount) { health -= amount; if (smh->timePassedSince(lastTimeHit) > FLASHING_DURATION) { lastTimeHit = smh->getGameTime(); openMouth(0.15); } playHitSound(); }
int PaintWidget::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QWidget::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: openMouth(); break; } _id -= 1; } return _id; }
int Fish::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QObject::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: changeDir((*reinterpret_cast< int(*)>(_a[1]))); break; case 1: move(); break; case 2: openMouth(); break; } _id -= 3; } return _id; }