本文整理汇总了C++中CChoreoEvent::SetActor方法的典型用法代码示例。如果您正苦于以下问题:C++ CChoreoEvent::SetActor方法的具体用法?C++ CChoreoEvent::SetActor怎么用?C++ CChoreoEvent::SetActor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CChoreoEvent
的用法示例。
在下文中一共展示了CChoreoEvent::SetActor方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: sizeof
//-----------------------------------------------------------------------------
// Purpose:
// Assignment
// Input : src -
//-----------------------------------------------------------------------------
CChoreoChannel& CChoreoChannel::operator=( const CChoreoChannel& src )
{
m_bActive = src.m_bActive;
Q_strncpy( m_szName, src.m_szName, sizeof( m_szName ) );
for ( int i = 0; i < src.m_Events.Count(); i++ )
{
CChoreoEvent *e = src.m_Events[ i ];
CChoreoEvent *newEvent = new CChoreoEvent( e->GetScene() );
*newEvent = *e;
AddEvent( newEvent );
newEvent->SetChannel( this );
newEvent->SetActor( m_pActor );
}
return *this;
}
示例2: RestoreFromBuffer
bool CChoreoChannel::RestoreFromBuffer( CUtlBuffer& buf, CChoreoScene *pScene, CChoreoActor *pActor, IChoreoStringPool *pStringPool )
{
char sz[ 256 ];
pStringPool->GetString( buf.GetShort(), sz, sizeof( sz ) );
SetName( sz );
int numEvents = (int)buf.GetUnsignedChar();
for ( int i = 0 ; i < numEvents; ++i )
{
CChoreoEvent *e = pScene->AllocEvent();
if ( e->RestoreFromBuffer( buf, pScene, pStringPool ) )
{
AddEvent( e );
e->SetChannel( this );
e->SetActor( pActor );
continue;
}
return false;
}
SetActive( buf.GetChar() == 1 ? true : false );
return true;
}