|
@@ -234,6 +234,8 @@ namespace oxygine
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+ Tween::easeHandler _customEaseHandler = 0;
|
|
|
|
|
+
|
|
|
float Tween::calcEase(EASE ease, float t)
|
|
float Tween::calcEase(EASE ease, float t)
|
|
|
{
|
|
{
|
|
|
const float s = 1.70158f;
|
|
const float s = 1.70158f;
|
|
@@ -264,7 +266,8 @@ namespace oxygine
|
|
|
DEF_EASY_FROM_IN(Bounce, 1 - outBounce(1 - t));
|
|
DEF_EASY_FROM_IN(Bounce, 1 - outBounce(1 - t));
|
|
|
|
|
|
|
|
default:
|
|
default:
|
|
|
- OX_ASSERT(!"unsupported ease");
|
|
|
|
|
|
|
+ t = _customEaseHandler(ease, t);
|
|
|
|
|
+ //OX_ASSERT(!"unsupported ease");
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -273,6 +276,11 @@ namespace oxygine
|
|
|
return t;
|
|
return t;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ void Tween::setCustomEaseHandler(easeHandler h)
|
|
|
|
|
+ {
|
|
|
|
|
+ _customEaseHandler = h;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
|
|
|
std::string ease2String(Tween::EASE ease)
|
|
std::string ease2String(Tween::EASE ease)
|
|
|
{
|
|
{
|