本文整理汇总了C++中CBasePlayerItem::SetThink方法的典型用法代码示例。如果您正苦于以下问题:C++ CBasePlayerItem::SetThink方法的具体用法?C++ CBasePlayerItem::SetThink怎么用?C++ CBasePlayerItem::SetThink使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CBasePlayerItem
的用法示例。
在下文中一共展示了CBasePlayerItem::SetThink方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Kill
//=========================================================
// CWeaponBox - Kill - the think function that removes the
// box from the world.
//=========================================================
void CWeaponBox::Kill( void )
{
CBasePlayerItem *pWeapon;
int i;
// destroy the weapons
for ( i = 0 ; i < MAX_ITEM_TYPES ; i++ )
{
pWeapon = m_rgpPlayerItems[ i ];
while ( pWeapon )
{
pWeapon->SetThink(SUB_Remove);
pWeapon->pev->nextthink = gpGlobals->time + 0.1;
pWeapon = pWeapon->m_pNext;
}
}
// remove the box
UTIL_Remove( this );
}
示例2: Kill
//=========================================================
// CWeaponBox - Kill - the think function that removes the
// box from the world.
//=========================================================
void CWeaponBox::Kill( void )
{
CBasePlayerItem *pWeapon;
int i;
// destroy the weapons
for ( i = 0 ; i < MAX_ITEM_TYPES ; i++ )
{
pWeapon = m_rgpPlayerItems[ i ];
while ( pWeapon )
{
pWeapon->SetThink(&CBasePlayerItem::SUB_Remove);
pWeapon->SetNextThink( 0.1 );
pWeapon = pWeapon->m_pNext;
}
}
// remove the box
UTIL_Remove( this );
}