本文整理汇总了C++中Sim::GetEvents方法的典型用法代码示例。如果您正苦于以下问题:C++ Sim::GetEvents方法的具体用法?C++ Sim::GetEvents怎么用?C++ Sim::GetEvents使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Sim
的用法示例。
在下文中一共展示了Sim::GetEvents方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
//.........这里部分代码省略.........
if (ship) {
SimRegion* rgn = sim->FindRegion(event_target);
if (rgn && ship->GetRegion() != rgn) {
if (rgn->IsOrbital()) {
QuantumDrive* quantum_drive = ship->GetQuantumDrive();
if (quantum_drive) {
quantum_drive->SetDestination(rgn, Point(0,0,0));
quantum_drive->Engage(true); // request immediate jump
}
else if (ship->IsAirborne()) {
ship->MakeOrbit();
}
}
else {
ship->DropOrbit();
}
}
}
break;
case HOLD:
if (elem)
elem->SetHoldTime(event_param[0]);
break;
case SKIP: {
for (int i = 0; i < event_nparams; i++) {
int skip_id = event_param[i];
ListIter<MissionEvent> iter = sim->GetEvents();
while (++iter) {
MissionEvent* e = iter.value();
if (e->EventID() == skip_id) {
if (e->status != COMPLETE)
e->status = SKIPPED;
}
}
}
}
break;
case END_MISSION:
Print(" END MISSION By Scripted Event %d (%s)\n", id, FormatGameTime());
end_mission = true;
break;
//
// NOTE: CUTSCENE EVENTS DO NOT APPLY IN MULTIPLAYER
//
case BEGIN_SCENE:
Print(" ------------------------------------\n");
Print(" Begin Cutscene '%s'\n", event_message.data());
stars->BeginCutscene();
break;
case END_SCENE:
Print(" End Cutscene '%s'\n", event_message.data());
Print(" ------------------------------------\n");
stars->EndCutscene();
break;
case CAMERA: