示例#1
0
	void SnakeLayer::update(float dt)
	{
		if (direction == Point::ZERO) return;

		drag(dt);
		truncate();
		if (testDie()) return;
		testPick();
	}
示例#2
0
int TestPlayer::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: testAdvance(); break;
        case 1: testFall(); break;
        case 2: testJump(); break;
        case 3: testCollectCoins(); break;
        case 4: testCollectEggs(); break;
        case 5: testIncreaseScore(); break;
        case 6: testKill(); break;
        case 7: testDie(); break;
        case 8: testCrossInvisibleItem(); break;
        case 9: testLaunchEggs(); break;
        case 10: testPassLevel(); break;
        default: ;
        }
        _id -= 11;
    }
    return _id;
}