本文整理汇总了C++中CFrame::SetanchorY方法的典型用法代码示例。如果您正苦于以下问题:C++ CFrame::SetanchorY方法的具体用法?C++ CFrame::SetanchorY怎么用?C++ CFrame::SetanchorY使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CFrame
的用法示例。
在下文中一共展示了CFrame::SetanchorY方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: LoadSingleAnimation
//.........这里部分代码省略.........
TiXmlElement* pNewFrame = pFrame;
////*****************Setting Height*********************************//
if( pNewFrame->Attribute("Height") == NULL )
break;
double dHeight = 0.0;
pNewFrame->Attribute("Height",&dHeight);
Frame->SetHeight((int)dHeight);
////*******************Setting Width*******************************//
if( pNewFrame->Attribute("Width") == NULL )
break;
double dWidth = 0.0;
pNewFrame->Attribute("Width",&dWidth);
Frame->SetWidth((int)dWidth);
//*****************Setting Anchor X*********************************//
if( pNewFrame->Attribute("AnchorX") == NULL)
break;
double dAnchorX = 0.0;
pNewFrame->Attribute("AnchorX",&dAnchorX);
Frame->SetAnchorX((int)dAnchorX);
////*******************Setting Anchor Y*******************************//
if( pNewFrame->Attribute("AnchorY") == NULL )
break;
double dAnchorY = 0.0;
pNewFrame->Attribute("AnchorY",&dAnchorY);
Frame->SetanchorY((int)dAnchorY);
//*****************Setting Draw X*********************************//
if( pNewFrame->Attribute("FrameX") == NULL)
break;
double dDrawX = 0.0;
pNewFrame->Attribute("FrameX",&dDrawX);
Frame->SetDrawX((int)dDrawX);
//*******************Setting Draw Y*******************************//
if( pNewFrame->Attribute("FrameY") == NULL )
break;
double dDrawY = 0.0;
pNewFrame->Attribute("FrameY",&dDrawY);
Frame->SetDrawY((int)dDrawY);
//*******************Setting Duration of Frame*********************//
if ( pNewFrame->Attribute("Duration") == NULL )
break;
double dDuration = 0.0;
pNewFrame->Attribute("Duration",&dDuration);
Frame->SetDuration((float)dDuration);
//*********************Setting Event**********************************//
if( pNewFrame->Attribute("Event") == NULL)
{
}
else
{
const char* szEvent = NULL;
char buffer[128] = {0};
szEvent = pNewFrame->Attribute("Event");
strcpy_s(buffer,_countof(buffer),szEvent);
Frame->SetEvent(buffer);
}
//*********************Add frame to vector and go to next*****************//
Anim->m_vecFrames.push_back(Frame);
pFrame = pFrame->NextSiblingElement("Frames");
}
//*******************Add animation to vector and continue*******************//
pAnim = pAnim->NextSiblingElement("Animation");
}
break;
} while(true);
return Anim;
}