本文整理汇总了C++中CBaseAnimating::entindex方法的典型用法代码示例。如果您正苦于以下问题:C++ CBaseAnimating::entindex方法的具体用法?C++ CBaseAnimating::entindex怎么用?C++ CBaseAnimating::entindex使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CBaseAnimating
的用法示例。
在下文中一共展示了CBaseAnimating::entindex方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: UpdatePanelSkin
// updates the panel prop (if any) with a skin to reflect the button's state
void CASW_Button_Area::UpdatePanelSkin()
{
if ( !m_hPanelProp.Get() )
return;
if ( asw_debug_button_skin.GetBool() )
{
Msg( "CASW_Button_Area:%d: UpdatePanelSkin\n", entindex() );
}
CBaseAnimating *pAnim = dynamic_cast<CBaseAnimating*>(m_hPanelProp.Get());
while (pAnim)
{
if (HasPower())
{
if (m_bIsLocked)
{
pAnim->m_nSkin = 1; // locked skin
if ( asw_debug_button_skin.GetBool() )
{
Msg( " Panel is locked, setting prop %d skin to %d\n", pAnim->entindex(), pAnim->m_nSkin.Get() );
}
}
else
{
pAnim->m_nSkin = 2; // unlocked skin
if ( asw_debug_button_skin.GetBool() )
{
Msg( " Panel is unlocked, setting prop %d skin to %d\n", pAnim->entindex(), pAnim->m_nSkin.Get() );
}
}
}
else
{
pAnim->m_nSkin = 0; // no power skin
if ( asw_debug_button_skin.GetBool() )
{
Msg( " Panel is no power, setting prop %d skin to %d\n", pAnim->entindex(), pAnim->m_nSkin.Get() );
}
}
if (m_bMultiplePanelProps)
pAnim = dynamic_cast<CBaseAnimating*>(gEntList.FindEntityByName( pAnim, m_szPanelPropName ));
else
pAnim = NULL;
}
}