本文整理汇总了C++中Starshatter::EndMission方法的典型用法代码示例。如果您正苦于以下问题:C++ Starshatter::EndMission方法的具体用法?C++ Starshatter::EndMission怎么用?C++ Starshatter::EndMission使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Starshatter
的用法示例。
在下文中一共展示了Starshatter::EndMission方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
//.........这里部分代码省略.........
if (image.Width() && image.Height())
disp_view->AddImage( &image,
color,
Video::BLEND_ALPHA,
event_rect,
event_point.y,
event_point.x,
event_point.z);
}
}
}
break;
case FIRE_WEAPON:
if (ship) {
// fire single weapon:
if (event_param[0] >= 0) {
ship->FireWeapon(event_param[0]);
}
// fire all weapons:
else {
ListIter<WeaponGroup> g_iter = ship->Weapons();
while (++g_iter) {
ListIter<Weapon> w_iter = g_iter->GetWeapons();
while (++w_iter) {
Weapon* w = w_iter.value();
w->Fire();
}
}
}
}
break;
default:
break;
}
sim->ProcessEventTrigger(TRIGGER_EVENT, id);
if (!silent && !sound && event_sound.length()) {
DataLoader* loader = DataLoader::GetLoader();
bool use_fs = loader->IsFileSystemEnabled();
DWORD flags = pan ? Sound::LOCKED|Sound::LOCALIZED :
Sound::LOCKED|Sound::AMBIENT;
loader->UseFileSystem(true);
loader->SetDataPath("Sounds/");
loader->LoadSound(event_sound, sound, flags);
loader->SetDataPath(0);
if (!sound) {
loader->SetDataPath("Mods/Sounds/");
loader->LoadSound(event_sound, sound, flags);
loader->SetDataPath(0);
}
if (!sound) {
loader->LoadSound(event_sound, sound, flags);
}
loader->UseFileSystem(use_fs);
// fire and forget:
if (sound) {
if (sound->GetFlags() & Sound::STREAMED) {
sound->SetFlags(flags | sound->GetFlags());
sound->SetVolume(AudioConfig::VoxVolume());
sound->Play();
}
else {
sound->SetFlags(flags);
sound->SetVolume(AudioConfig::VoxVolume());
sound->SetPan(pan);
sound->SetFilename(event_sound);
sound->AddToSoundCard();
sound->Play();
}
}
}
status = COMPLETE;
if (end_mission) {
StarServer* server = StarServer::GetInstance();
if (stars) {
stars->EndMission();
}
else if (server) {
// end mission event uses event_target member
// to forward server to next mission in the chain:
if (event_target.length())
server->SetNextMission(event_target);
server->SetGameMode(StarServer::MENU_MODE);
}
}
}