mirror of https://github.com/axmolengine/axmol.git
Fix FadeOutDownTilesTest won't show last tile
This commit is contained in:
parent
036585ef95
commit
f374df408e
|
@ -572,12 +572,12 @@ FadeOutDownTiles* FadeOutDownTiles::clone() const
|
||||||
float FadeOutDownTiles::testFunc(const Size& pos, float time)
|
float FadeOutDownTiles::testFunc(const Size& pos, float time)
|
||||||
{
|
{
|
||||||
Vec2 n = Vec2((float)_gridSize.width, (float)_gridSize.height) * (1.0f - time);
|
Vec2 n = Vec2((float)_gridSize.width, (float)_gridSize.height) * (1.0f - time);
|
||||||
if (pos.height == 0)
|
//if (pos.height == 0)
|
||||||
{
|
//{
|
||||||
return 1.0f;
|
// return 1.0f;
|
||||||
}
|
//}
|
||||||
|
|
||||||
return powf(n.y / pos.height, 6);
|
return powf(n.y / (pos.height > 0.0f ? pos.height : 0.1f), 6);
|
||||||
}
|
}
|
||||||
|
|
||||||
// implementation of TurnOffTiles
|
// implementation of TurnOffTiles
|
||||||
|
|
Loading…
Reference in New Issue