コード例 #1
0
CCEaseElasticInOut* CCEaseElasticInOut::create ( CCActionInterval* pAction, KDfloat fPeriod )
{
	CCEaseElasticInOut*  pRet = new CCEaseElasticInOut ( );

    if ( pRet->initWithAction ( pAction, fPeriod ) )
    {
        pRet->autorelease ( );
    }
    else
    {
        CC_SAFE_DELETE ( pRet );
    }

	return pRet; 
}
コード例 #2
0
	CCEaseElasticInOut* CCEaseElasticInOut::actionWithAction(CCIntervalAction *pAction, float fPeriod)
	{
		CCEaseElasticInOut *pRet = new CCEaseElasticInOut();
		if (pRet)
		{
			if (pRet->initWithAction(pAction, fPeriod))
			{
				pRet->autorelease();
			}
			else
			{
				CCX_SAFE_RELEASE_NULL(pRet);
			}
		}

		return pRet; 
	}
コード例 #3
0
ファイル: CCActionEase.cpp プロジェクト: csdnnet/hiygame
CCEaseElasticInOut* CCEaseElasticInOut::create(CCActionInterval *pAction, float fPeriod/* = 0.3f*/)
{
    CCEaseElasticInOut *pRet = new CCEaseElasticInOut();
    if (pRet)
    {
        if (pRet->initWithAction(pAction, fPeriod))
        {
            pRet->autorelease();
        }
        else
        {
            CC_SAFE_RELEASE_NULL(pRet);
        }
    }

    return pRet; 
}
コード例 #4
0
	//
	// EaseElasticInOut
	//
	CCEaseElasticInOut* CCEaseElasticInOut::actionWithAction(CCActionInterval *pAction)
	{
		CCEaseElasticInOut *pRet = new CCEaseElasticInOut();
		if (pRet)
		{
			if (pRet->initWithAction(pAction))
			{
				pRet->autorelease();
			}
			else
			{
				CC_SAFE_RELEASE_NULL(pRet);
			}
		}

		return pRet; 
	}
コード例 #5
0
	NSObject* CCEaseElasticInOut::copyWithZone(cocos2d::NSZone *pZone)
	{
		NSZone* pNewZone = NULL;
		CCEaseElasticInOut* pCopy = NULL;
		if(pZone && pZone->m_pCopyObject) 
		{
			//in case of being called at sub class
			pCopy = (CCEaseElasticInOut*)(pZone->m_pCopyObject);
		}
		else
		{
			pCopy = new CCEaseElasticInOut();
			pZone = pNewZone = new NSZone(pCopy);
		}

		pCopy->initWithAction((CCIntervalAction *)(m_pOther->copy()->autorelease()), m_fPeriod);

		CCX_SAFE_DELETE(pNewZone);
		return pCopy;

	}
コード例 #6
0
CCObject* CCEaseElasticInOut::copyWithZone ( CCZone* pZone )
{
	CCZone*           pNewZone = KD_NULL;
	CCEaseElasticInOut*  pCopy = KD_NULL;

	if ( pZone && pZone->m_pCopyObject ) 
	{
		//in case of being called at sub class
		pCopy = (CCEaseElasticInOut *) pZone->m_pCopyObject;
	}
	else
	{
		pCopy = new CCEaseElasticInOut ( );
		pNewZone = new CCZone ( pCopy );
	}

	pCopy->initWithAction ( (CCActionInterval*) m_pInner->copy ( )->autorelease ( ), m_fPeriod );

	CC_SAFE_DELETE ( pNewZone );

	return pCopy;
}