void dragon::deadMotion() { if (_state == ES_DEAD) { if (_life != 0 && _jumpPwr == 0.f) { _unbeatCnt += TIMEMANAGER->getElapsedTime(); if (_unbeatCnt > 0.5f) { _unbeatCnt = 0.f; _state = ES_IDLE; _curFrameX = 0; } } else { _deadCnt += TIMEMANAGER->getElapsedTime(); if (_deadCnt > 0.5f) { _deadCnt = 0.f; ITEMMANAGER->addGemsItem(_x, _y, false, false, 60); setIsDead(true); } } } }
void Person::setStrength(int str) { strength = str; if (1 > strength) { setIsDead(false); } }
void cMario::reset(sf::Sprite & rThisSprite) { rThisSprite.SetX(200); rThisSprite.SetY(200); xSpeed = 0; xAccel = 0; ySpeed = 0; yAccel = 0; setIsDead(false); }
int StickMan::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QGraphicsObject::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { if (_id < 2) qt_static_metacall(this, _c, _id, _a); _id -= 2; } #ifndef QT_NO_PROPERTIES else if (_c == QMetaObject::ReadProperty) { void *_v = _a[0]; switch (_id) { case 0: *reinterpret_cast< QColor*>(_v) = penColor(); break; case 1: *reinterpret_cast< QColor*>(_v) = fillColor(); break; case 2: *reinterpret_cast< bool*>(_v) = isDead(); break; } _id -= 3; } else if (_c == QMetaObject::WriteProperty) { void *_v = _a[0]; switch (_id) { case 0: setPenColor(*reinterpret_cast< QColor*>(_v)); break; case 1: setFillColor(*reinterpret_cast< QColor*>(_v)); break; case 2: setIsDead(*reinterpret_cast< bool*>(_v)); break; } _id -= 3; } else if (_c == QMetaObject::ResetProperty) { _id -= 3; } else if (_c == QMetaObject::QueryPropertyDesignable) { _id -= 3; } else if (_c == QMetaObject::QueryPropertyScriptable) { _id -= 3; } else if (_c == QMetaObject::QueryPropertyStored) { _id -= 3; } else if (_c == QMetaObject::QueryPropertyEditable) { _id -= 3; } else if (_c == QMetaObject::QueryPropertyUser) { _id -= 3; } #endif // QT_NO_PROPERTIES return _id; }