axmol/extensions/fairygui/tween/GTween.cpp

87 lines
2.3 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);
}
GTweener* GTween::to(const axis::Vec2& startValue, const axis::Vec2 & endValue, float duration)
2020-08-04 12:31:33 +08:00
{
return TweenManager::createTween()->_to(startValue, endValue, duration);
}
GTweener* GTween::to(const axis::Vec3& startValue, const axis::Vec3 & endValue, float duration)
2020-08-04 12:31:33 +08:00
{
return TweenManager::createTween()->_to(startValue, endValue, duration);
}
GTweener* GTween::to(const axis::Vec4& startValue, const axis::Vec4 & endValue, float duration)
2020-08-04 12:31:33 +08:00
{
return TweenManager::createTween()->_to(startValue, endValue, duration);
}
GTweener* GTween::to(const axis::Color4B& startValue, const axis::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);
}
GTweener* GTween::shake(const axis::Vec2& startValue, float amplitude, float duration)
2020-08-04 12:31:33 +08:00
{
return TweenManager::createTween()->_shake(startValue, amplitude, duration);
}
bool GTween::isTweening(axis::Ref * target)
2020-08-04 12:31:33 +08:00
{
return TweenManager::isTweening(target, TweenPropType::None);
}
bool GTween::isTweening(axis::Ref * target, TweenPropType propType)
2020-08-04 12:31:33 +08:00
{
return TweenManager::isTweening(target, propType);
}
void GTween::kill(axis::Ref * target)
2020-08-04 12:31:33 +08:00
{
TweenManager::killTweens(target, TweenPropType::None, false);
}
void GTween::kill(axis::Ref * target, bool complete)
2020-08-04 12:31:33 +08:00
{
TweenManager::killTweens(target, TweenPropType::None, complete);
}
void GTween::kill(axis::Ref * target, TweenPropType propType, bool complete)
2020-08-04 12:31:33 +08:00
{
TweenManager::killTweens(target, propType, complete);
}
GTweener* GTween::getTween(axis::Ref * target)
2020-08-04 12:31:33 +08:00
{
return TweenManager::getTween(target, TweenPropType::None);
}
GTweener* GTween::getTween(axis::Ref * target, TweenPropType propType)
2020-08-04 12:31:33 +08:00
{
return TweenManager::getTween(target, propType);
}
void GTween::clean()
{
TweenManager::clean();
}
NS_FGUI_END