本文整理汇总了C++中CCActionInterval::initWithDuration方法的典型用法代码示例。如果您正苦于以下问题:C++ CCActionInterval::initWithDuration方法的具体用法?C++ CCActionInterval::initWithDuration怎么用?C++ CCActionInterval::initWithDuration使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CCActionInterval
的用法示例。
在下文中一共展示了CCActionInterval::initWithDuration方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: copyWithZone
CCObject* CCActionInterval::copyWithZone(CCZone *pZone)
{
CCZone* pNewZone = NULL;
CCActionInterval* pCopy = NULL;
if(pZone && pZone->m_pCopyObject)
{
//in case of being called at sub class
pCopy = (CCActionInterval*)(pZone->m_pCopyObject);
}
else
{
// action's base class , must be called using __super::copyWithZone(), after overriding from derived class
CCAssert(0, "");
pCopy = new CCActionInterval();
pZone = pNewZone = new CCZone(pCopy);
}
CCFiniteTimeAction::copyWithZone(pZone);
CC_SAFE_DELETE(pNewZone);
pCopy->initWithDuration(m_fDuration);
return pCopy;
}
示例2: create
CCActionInterval* CCActionInterval::create(float d){
CCActionInterval *pAction = new CCActionInterval();
pAction->initWithDuration(d);
// pAction->autorelease();
return pAction;
}
示例3: actionWithDuration
//
// IntervalAction
//
CCActionInterval* CCActionInterval::actionWithDuration(ccTime d)
{
CCActionInterval *pAction = new CCActionInterval();
pAction->initWithDuration(d);
pAction->autorelease();
return pAction;
}