本文整理汇总了C++中Sim::FindOrbitalBody方法的典型用法代码示例。如果您正苦于以下问题:C++ Sim::FindOrbitalBody方法的具体用法?C++ Sim::FindOrbitalBody怎么用?C++ Sim::FindOrbitalBody使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Sim
的用法示例。
在下文中一共展示了Sim::FindOrbitalBody方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
//.........这里部分代码省略.........
s_tgt = sim->FindShip(event_target);
if (s_tgt) {
::Print(" found ship %s\n", s_tgt->Name());
cam_dir->SetViewOrbital(0);
if (cam_dir->GetViewObject() != s_tgt) {
if (event_param[0] == 6) {
s_tgt->DropCam(event_param[1], event_param[2]);
cam_dir->SetShip(s_tgt);
cam_dir->SetMode(CameraDirector::MODE_DROP, 0);
}
else {
Ship* cam_ship = cam_dir->GetShip();
if (cam_ship && cam_ship->IsDropCam()) {
cam_ship->CompleteTransition();
}
if (cam_dir->GetShip() != sim->GetPlayerShip())
cam_dir->SetShip(sim->GetPlayerShip());
cam_dir->SetViewObject(s_tgt, true); // immediate, no transition
}
}
}
else {
const char* body_name = event_target.data();
if (!strncmp(body_name, "body:", 5))
body_name += 5;
Orbital* orb = sim->FindOrbitalBody(body_name);
if (orb) {
::Print(" found body %s\n", orb->Name());
cam_dir->SetViewOrbital(orb);
}
}
}
if (event_param[0] == 3) {
cam_dir->SetOrbitPoint(event_point.x, event_point.y, event_point.z);
}
else if (event_param[0] == 5) {
cam_dir->SetOrbitRates(event_point.x, event_point.y, event_point.z);
}
}
break;
case VOLUME:
if (stars->InCutscene()) {
AudioConfig* audio_cfg = AudioConfig::GetInstance();
audio_cfg->SetEfxVolume(event_param[0]);
audio_cfg->SetWrnVolume(event_param[0]);
}
break;
case DISPLAY:
if (stars->InCutscene()) {
DisplayView* disp_view = DisplayView::GetInstance();
if (disp_view) {