double fRate = (double)(GetTickCount() - m_dwShineStartTime) / (double)(350);
if (m_bFadeType)
{
//渐隐
if (fRate < 1)
{
fRate = 1.0 - fRate;
}
else
{
m_bFadeType = FALSE;
fRate = 0;
m_dwShineStartTime = GetTickCount();
}
}
else
{
//渐显
if (fRate > 1)
{
m_bFadeType = TRUE;
fRate = 1;
m_dwShineStartTime = GetTickCount();
}
fRate = pow(fRate, 2);
}
}
呼吸
最新推荐文章于 2024-02-25 10:54:09 发布