本文整理汇总了C++中Neighborhood::requestDeleteCurrentInteraction方法的典型用法代码示例。如果您正苦于以下问题:C++ Neighborhood::requestDeleteCurrentInteraction方法的具体用法?C++ Neighborhood::requestDeleteCurrentInteraction怎么用?C++ Neighborhood::requestDeleteCurrentInteraction使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Neighborhood
的用法示例。
在下文中一共展示了Neighborhood::requestDeleteCurrentInteraction方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: receiveNotification
void PressureDoor::receiveNotification(Notification *notification, const NotificationFlags flags) {
Neighborhood *owner = getOwner();
if (notification == _neighborhoodNotification) {
if (_playingAgainstRobot && (flags & kExtraCompletedFlag) != 0) {
ExtraTable::Entry entry;
switch (_robotState) {
case kPlayingRobotApproaching:
_utilityTimer.stop();
if (GameState.getNoradSubRoomPressure() == kMaxPressure) {
owner->getExtraEntry(kN59PlayerWins1, entry);
_utilityTimer.setSegment(entry.movieStart, entry.movieEnd);
_utilityTimer.setTime(entry.movieStart);
_utilityCallBack.setCallBackFlag(kDoorJumpsUpFlag);
_punchInTime = kLoopPunchInTime + entry.movieStart;
_utilityCallBack.scheduleCallBack(kTriggerTimeFwd, _punchInTime, kNavTimeScale);
owner->startExtraSequence(kN59PlayerWins1, kExtraCompletedFlag, kFilterNoInput);
_utilityTimer.start();
_robotState = kRobotDying;
} else {
owner->getExtraEntry(kN59RobotPunchLoop, entry);
_utilityTimer.setSegment(entry.movieStart, entry.movieEnd);
_utilityTimer.setTime(entry.movieStart);
_utilityCallBack.setCallBackFlag(kDoorJumpsUpFlag);
_punchInTime = kLoopPunchInTime + entry.movieStart;
_utilityCallBack.scheduleCallBack(kTriggerTimeFwd, _punchInTime, kNavTimeScale);
owner->startSpotLoop(entry.movieStart, entry.movieEnd, kExtraCompletedFlag);
_utilityTimer.start();
_robotState = kRobotPunching;
_punchCount = 1;
}
break;
case kRobotPunching:
if (GameState.getNoradSubRoomPressure() == kMaxPressure) {
owner->startExtraSequence(kN59PlayerWins1, kExtraCompletedFlag, kFilterNoInput);
_robotState = kRobotDying;
} else if (++_punchCount >= kMaxPunches) {
_robotState = kRobotComingThrough;
owner->getExtraEntry(kN59RobotWins, entry);
_utilityTimer.stop();
_utilityTimer.setSegment(entry.movieStart, entry.movieEnd);
_utilityTimer.setTime(entry.movieStart);
_utilityCallBack.cancelCallBack();
_utilityCallBack.setCallBackFlag(kDoorCrushedFlag);
_utilityCallBack.scheduleCallBack(kTriggerTimeFwd, kPunchThroughTime + entry.movieStart, kNavTimeScale);
owner->startExtraSequence(kN59RobotWins, kExtraCompletedFlag, kFilterNoInput);
_utilityTimer.start();
} else {
_utilityCallBack.setCallBackFlag(kDoorJumpsUpFlag);
_utilityCallBack.scheduleCallBack(kTriggerTimeFwd, _punchInTime, kNavTimeScale);
owner->scheduleNavCallBack(kExtraCompletedFlag);
}
break;
case kRobotComingThrough:
g_system->delayMillis(2 * 1000);
((PegasusEngine *)g_engine)->die(kDeathRobotThroughNoradDoor);
break;
case kRobotDying:
_robotState = kRobotDead;
_levelsMovie.stop();
_levelsMovie.setSegment((kNormalSubRoomPressure + kPressureBase) * _levelsScale,
(GameState.getNoradSubRoomPressure() + kPressureBase) * _levelsScale + 1);
_levelsMovie.setTime((GameState.getNoradSubRoomPressure() + kPressureBase) * _levelsScale);
_pressureCallBack.setCallBackFlag(kPressureDroppingFlag);
_pressureCallBack.scheduleCallBack(kTriggerAtStart, 0, 0);
_typeMovie.stop();
_typeMovie.setSegment(0, _typeMovie.getDuration());
_typeMovie.setTime(kDecreasingPressureTime * _typeScale);
_typeMovie.redrawMovieWorld();
_typeMovie.show();
_downButton.show();
_downButton.setCurrentFrameIndex(1);
_gameState = kGameOver;
allowInput(false);
_levelsMovie.setRate(Common::Rational(-4, 3)); // Should match door tracker.
break;
case kRobotDead:
allowInput(true);
((NoradDelta *)owner)->playerBeatRobotWithDoor();
owner->requestDeleteCurrentInteraction();
break;
}
}
if ((flags & (kDelayCompletedFlag | kSpotSoundCompletedFlag)) != 0) {
switch (_gameState) {
case kPlayingPressureMessage:
_typeMovie.setTime(kEqualizeTime * _typeScale);
_typeMovie.redrawMovieWorld();
owner->requestDelay(1, 5, kFilterNoInput, 0);
owner->requestSpotSound(_equalizeSoundIn, _equalizeSoundOut, kFilterNoInput, 0);
owner->requestDelay(1, 5, kFilterNoInput, kDelayCompletedFlag);
_gameState = kPlayingEqualizeMessage;
break;
case kPlayingEqualizeMessage:
_gameState = kWaitingForPlayer;
stopChangingPressure();
break;
case kPlayingDoneMessage:
//.........这里部分代码省略.........