当前位置: 首页>>代码示例>>C++>>正文


C++ CAI::UnlinkCinematicTrigger方法代码示例

本文整理汇总了C++中CAI::UnlinkCinematicTrigger方法的典型用法代码示例。如果您正苦于以下问题:C++ CAI::UnlinkCinematicTrigger方法的具体用法?C++ CAI::UnlinkCinematicTrigger怎么用?C++ CAI::UnlinkCinematicTrigger使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CAI的用法示例。


在下文中一共展示了CAI::UnlinkCinematicTrigger方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: HandleOff

void CinematicTrigger::HandleOff()
{
	if (!m_bOn) return;

	for ( uint32 iWho = 0 ; iWho < MAX_CT_MESSAGES; iWho++ )
	{
		if ( m_hstrWhoPlaysDialogue[iWho] )
		{
			HOBJECT hWho;
			if ( LT_OK == FindNamedObject(m_hstrWhoPlaysDialogue[iWho], hWho) )
			{
				if ( IsKindOf(hWho, "CAI") )
				{
					CAI* pAI = (CAI*)g_pLTServer->HandleToObject(hWho);
					pAI->UnlinkCinematicTrigger(m_hObject);
				}
			}
		}
	}

    m_bOn = LTFALSE;

	// If we have a current speaker, make sure he is done talking...

	if (m_hCurSpeaker)
	{
        CCharacter* pChar = (CCharacter*)g_pLTServer->HandleToObject(m_hCurSpeaker);
		if (pChar)
		{
			pChar->StopDialogue();
		}

		// Clear our speaker...

        g_pLTServer->BreakInterObjectLink(m_hObject, m_hCurSpeaker);
        m_hCurSpeaker = LTNULL;
	}

	// Clear out our last speaker

	if (m_hLastSpeaker)
	{
        CCharacter* pChar = (CCharacter*)g_pLTServer->HandleToObject(m_hLastSpeaker);
		if (pChar)
		{
			pChar->StopDialogue(TRUE);
		}
        g_pLTServer->BreakInterObjectLink(m_hObject, m_hLastSpeaker);
        m_hLastSpeaker = LTNULL;
	}


	// Send the clean up trigger message...

	if (m_hstrCleanUpTriggerTarget && m_hstrCleanUpTriggerMsg)
	{
        SendTriggerMsgToObjects(this, g_pLTServer->GetStringData( m_hstrCleanUpTriggerTarget ), g_pLTServer->GetStringData( m_hstrCleanUpTriggerMsg ));
	}

	// Turn off the camera...

	if (m_hCamera && !m_bLeaveCameraOn)
	{
		SendTriggerMsgToObject(this, m_hCamera, FALSE, "OFF");
	}

	// Turn off the keyframer...

	if (m_hKeyFramer)
	{
		SendTriggerMsgToObject(this, m_hKeyFramer, FALSE, "OFF");
	}

    SetNextUpdate(m_hObject, 0.0f);

	if (m_bOneTimeOnly)
	{
		// Can't get rid of object if we're leaving the camera on ;)...

		if (!m_hCamera || !m_bLeaveCameraOn)
		{
			g_pLTServer->RemoveObject(m_hObject);
		}
	}
}
开发者ID:germanocaldeira,项目名称:no-one-lives-forever,代码行数:85,代码来源:CinematicTrigger.cpp


注:本文中的CAI::UnlinkCinematicTrigger方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。