CCEaseInOut* CCEaseInOut::create ( CCActionInterval* pAction, KDfloat fRate )
{
	CCEaseInOut*  pRet = new CCEaseInOut ( );

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

	return pRet;        
}
Esempio n. 2
0
	//
	// EaseInOut
	//
	CCEaseInOut* CCEaseInOut::actionWithAction(cocos2d::CCIntervalAction *pAction, float fRate)
	{
		CCEaseInOut *pRet = new CCEaseInOut();
		if (pRet)
		{
			if (pRet->initWithAction(pAction, fRate))
			{
				pRet->autorelease();
			}
			else
			{
				CCX_SAFE_RELEASE_NULL(pRet);
			}
		}

		return pRet;        
	}
Esempio n. 3
0
CCEaseInOut* CCEaseInOut::create(CCActionInterval *pAction, float fRate)
{
    CCEaseInOut *pRet = new CCEaseInOut();
    if (pRet)
    {
        if (pRet->initWithAction(pAction, fRate))
        {
            pRet->autorelease();
        }
        else
        {
            CC_SAFE_RELEASE_NULL(pRet);
        }
    }

    return pRet; 
}
Esempio n. 4
0
	NSObject* CCEaseInOut::copyWithZone(cocos2d::NSZone *pZone)
	{
		NSZone* pNewZone = NULL;
		CCEaseInOut* pCopy = NULL;
		if(pZone && pZone->m_pCopyObject) 
		{
			//in case of being called at sub class
			pCopy = (CCEaseInOut*)(pZone->m_pCopyObject);
		}
		else
		{
			pCopy = new CCEaseInOut();
			pZone = pNewZone = new NSZone(pCopy);
		}

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

		CCX_SAFE_DELETE(pNewZone);
		return pCopy;
	}
Esempio n. 5
0
CCObject* CCEaseInOut::copyWithZone(CCZone *pZone)
{
    CCZone* pNewZone = NULL;
    CCEaseInOut* pCopy = NULL;
    if(pZone && pZone->m_pCopyObject) 
    {
        //in case of being called at sub class
        pCopy = (CCEaseInOut*)(pZone->m_pCopyObject);
    }
    else
    {
        pCopy = new CCEaseInOut();
        pNewZone = new CCZone(pCopy);
    }

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

    CC_SAFE_DELETE(pNewZone);
    return pCopy;
}