コード例 #1
0
//
// MoveBy
//
CCMoveBy* CCMoveBy::actionWithDuration(ccTime duration, const CCPoint& position)
{
	CCMoveBy *pMoveBy = new CCMoveBy();
	pMoveBy->initWithDuration(duration, position);
	pMoveBy->autorelease();

	return pMoveBy;
}
コード例 #2
0
//
// MoveBy
//
CCMoveBy* CCMoveBy::create(float duration, const CCPoint& position)
{
	CCMoveBy *pMoveBy = new CCMoveBy();
	pMoveBy->initWithDuration(duration, position);
	pMoveBy->autorelease();

	return pMoveBy;
}
コード例 #3
0
//
// MoveBy
//
CCMoveBy* CCMoveBy::actionWithDuration(cocos2d::ccTime duration, cocos2d::CGPoint position)
{
	CCMoveBy *pMoveBy = new CCMoveBy();
	pMoveBy->initWithDuration(duration, position);
	pMoveBy->autorelease();

	return pMoveBy;
}
コード例 #4
0
CCObject* CCMoveBy::copyWithZone(CCZone *pZone)
{
	CCZone* pNewZone = NULL;
	CCMoveBy* pCopy = NULL;
	if(pZone && pZone->m_pCopyObject) 
	{
		//in case of being called at sub class
		pCopy = (CCMoveBy*)(pZone->m_pCopyObject);
	}
	else
	{
		pCopy = new CCMoveBy();
		pZone = pNewZone = new CCZone(pCopy);
	}

	CCMoveTo::copyWithZone(pZone);

	pCopy->initWithDuration(m_fDuration, m_delta);
	
	CC_SAFE_DELETE(pNewZone);
	return pCopy;
}
コード例 #5
0
ファイル: CCActionInterval.cpp プロジェクト: 1179432578/gl02
CCMoveBy* CCMoveBy::create(float duration, const CCPoint& deltaPosition){
    CCMoveBy *ret = new CCMoveBy;
    ret->initWithDuration(duration, deltaPosition);
    
    return ret;
}