本文整理汇总了C++中Spy::assassinate方法的典型用法代码示例。如果您正苦于以下问题:C++ Spy::assassinate方法的具体用法?C++ Spy::assassinate怎么用?C++ Spy::assassinate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Spy
的用法示例。
在下文中一共展示了Spy::assassinate方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: detect_spy_menu
//--------- Begin of function Firm::detect_spy_menu ---------//
//
void Firm::detect_spy_menu()
{
firm_ptr = this;
if( spy_filter()==0 )
return;
browse_spy.detect();
Spy* spyPtr = spy_array[ spy_filter( browse_spy.recno() ) ];
//--------- detect buttons --------//
//--------- spy menu mode -----------//
if( firm_menu_mode == FIRM_MENU_SPY )
{
//------ mobilize spy ---------//
if( button_spy_mobilize.detect() )
{
if( !remote.is_enable() )
{
if( spyPtr->mobilize_firm_spy() )
{
spyPtr->notify_cloaked_nation_flag = 0; // reset it so the player can control it
info.disp();
return;
}
}
else
{
// packet structure <spy recno>
short *shortPtr = (short *)remote.new_send_queue_msg(MSG_SPY_LEAVE_FIRM, sizeof(short) );
*shortPtr = spyPtr->spy_recno;
}
}
//------ reward spy ---------//
else if( button_spy_reward.detect() )
{
spyPtr->reward(COMMAND_PLAYER);
}
//------- change spy action ---------//
else if( button_spy_action.detect() ) // set action mode
{
if( !remote.is_enable() )
{
spyPtr->set_next_action_mode();
disp_spy_menu( INFO_UPDATE );
}
else
{
// packet structure <spy recno>
short *shortPtr = (short *)remote.new_send_queue_msg(MSG_SPY_CYCLE_ACTION, sizeof(short) );
*shortPtr = spyPtr->spy_recno;
}
}
//------ capture firm ---------//
else if( button_capture.detect() )
{
int spyRecno = can_player_spy_capture();
if( spyRecno )
{
Spy* capturerSpy = spy_array[spyRecno];
if( !remote.is_enable() )
{
capturerSpy->capture_firm();
}
else
{
// packet structure <spy recno>
short *shortPtr = (short *)remote.new_send_queue_msg(MSG_SPY_CAPTURE_FIRM, sizeof(short) );
*shortPtr = capturerSpy->spy_recno;
}
}
}
//------ view secret ---------//
else if( button_view_secret.detect() )
{
action_spy_recno = spyPtr->spy_recno;
firm_menu_mode = FIRM_MENU_VIEW_SECRET;
info.disp();
}
//-------- assassinate ------//
else if( button_assassinate.detect() )
{
//.........这里部分代码省略.........