axmol/extensions/fairygui/tween/GTween.cpp

67 lines
1.9 KiB
C++
Raw Normal View History

2020-08-04 12:31:33 +08:00
#include "GTween.h"
#include "TweenManager.h"
NS_FGUI_BEGIN
USING_NS_AX;
2020-08-04 12:31:33 +08:00
GTweener* GTween::to(float startValue, float endValue, float duration)
{
return TweenManager::createTween()->_to(startValue, endValue, duration);
}
2022-08-08 18:02:17 +08:00
GTweener* GTween::to(const ax::Vec2& startValue, const ax::Vec2 & endValue, float duration)
2020-08-04 12:31:33 +08:00
{
return TweenManager::createTween()->_to(startValue, endValue, duration);
}
2022-08-08 18:02:17 +08:00
GTweener* GTween::to(const ax::Vec3& startValue, const ax::Vec3 & endValue, float duration)
2020-08-04 12:31:33 +08:00
{
return TweenManager::createTween()->_to(startValue, endValue, duration);
}
2022-08-08 18:02:17 +08:00
GTweener* GTween::to(const ax::Vec4& startValue, const ax::Vec4 & endValue, float duration)
2020-08-04 12:31:33 +08:00
{
return TweenManager::createTween()->_to(startValue, endValue, duration);
}
2022-08-08 18:02:17 +08:00
GTweener* GTween::to(const ax::Color4B& startValue, const ax::Color4B & endValue, float duration)
2020-08-04 12:31:33 +08:00
{
return TweenManager::createTween()->_to(startValue, endValue, duration);
}
GTweener* GTween::toDouble(double startValue, double endValue, float duration)
{
return TweenManager::createTween()->_to(startValue, endValue, duration);
}
GTweener* GTween::delayedCall(float delay)
{
return TweenManager::createTween()->setDelay(delay);
}
2022-08-08 18:02:17 +08:00
GTweener* GTween::shake(const ax::Vec2& startValue, float amplitude, float duration)
2020-08-04 12:31:33 +08:00
{
return TweenManager::createTween()->_shake(startValue, amplitude, duration);
}
2024-01-06 23:25:20 +08:00
bool GTween::isTweening(ax::Ref* target, TweenPropType propType/* = TweenPropType::None*/)
2020-08-04 12:31:33 +08:00
{
return TweenManager::isTweening(target, propType);
}
2024-01-06 23:25:20 +08:00
void GTween::kill(ax::Ref* target, TweenPropType propType/* = TweenPropType::None*/, bool complete/* = false*/)
2020-08-04 12:31:33 +08:00
{
TweenManager::killTweens(target, propType, complete);
}
2024-01-06 23:25:20 +08:00
GTweener* GTween::getTween(ax::Ref* target, TweenPropType propType/* = TweenPropType::None*/)
2020-08-04 12:31:33 +08:00
{
return TweenManager::getTween(target, propType);
}
void GTween::clean()
{
TweenManager::clean();
}
NS_FGUI_END