if (iLast!=0)
{
m_iStayTime = iLast*60;
}
m_bSplashing = bSplashing;
SetVisible(true);
if (m_iMode==1)
{
m_HighLight.SetVisible(false);
}
m_iStayCount = 0;
switch (m_iNumber)
{
case 1:
m_iSplashAlpha = 220;
break;
case 3:
m_iSplashAlpha = 220;
break;
case 4:
m_iSplashAlpha = 255;
break;
case 6:
m_iSplashAlpha = 255;
break;
case 7:
m_iSplashAlpha = 255;
break;
case 9:
m_iSplashAlpha = 255;
break;
case 10:
m_iSplashAlpha = 220;
break;
case 11:
m_iSplashAlpha = 255;
break;
case 13:
m_iSplashAlpha = 220;
break;
case 17:
m_iSplashAlpha = 220;
break;
default:
break;
}
SetActive(true);
Play(10, 0);
if (m_bSplashing)
{
if (!GetPlaying())
{
m_bSplashing = false;
if (m_iMode==1)
{
m_bStaying = true;
}
else
{
SetVisible(false);
}
}
}
if (m_bStaying)
{
m_iStayCount++;
if (m_iStayCount>=m_iStayTime)
{
m_bStaying = false;
m_bFading = true;
}
}
if (m_bFading)
{
m_iSplashAlpha -= 5;
if (m_iSplashAlpha<=0)
{
m_iSplashAlpha = 0;
m_bFading = false;
}
SetAlpha(m_iSplashAlpha);
m_HighLight.SetAlpha(m_iSplashAlpha);
}
You maybe can't understand my code. Because I use C++, and enclose a class CSprite.
The Miracrea Games