コード例 #1
0
int UIWidget::getOpacity()
{
    CCRGBAProtocol* rgbap = DYNAMIC_CAST_CCRGBAPROTOCOL;
    if (rgbap)
    {
        return rgbap->getOpacity();
    }
    return 0;
}
コード例 #2
0
void CCFadeTo::startWithTarget(CCNode *pTarget)
{
	CCActionInterval::startWithTarget(pTarget);

	CCRGBAProtocol *pRGBAProtocol = dynamic_cast<CCRGBAProtocol*>(pTarget);
	if (pRGBAProtocol)
	{
		m_fromOpacity = pRGBAProtocol->getOpacity();
	}
	/*m_fromOpacity = pTarget->getOpacity();*/
}
コード例 #3
0
void CCFadeTo::startWithTarget(CCNode *pTarget)
{
	CCActionInterval::startWithTarget(pTarget);

	CCRGBAProtocol *pRGBAProtocol = pTarget->convertToRGBAProtocol();
	if (pRGBAProtocol)
	{
		m_fromOpacity = pRGBAProtocol->getOpacity();
	}
	/*m_fromOpacity = pTarget->getOpacity();*/
}