update Tween
This commit is contained in:
parent
90bfda923d
commit
5327159e99
|
|
@ -100,63 +100,65 @@ namespace kiwano
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static inline TweenHelper
|
static inline TweenHelper
|
||||||
MoveBy(Point const& vector)
|
MoveBy(Duration dur, Point const& vector)
|
||||||
{
|
{
|
||||||
return TweenHelper(new kiwano::ActionMoveBy(0, vector));
|
return TweenHelper(new kiwano::ActionMoveBy(dur, vector));
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline TweenHelper
|
static inline TweenHelper
|
||||||
MoveTo(Point const& pos)
|
MoveTo(Duration dur, Point const& pos)
|
||||||
{
|
{
|
||||||
return TweenHelper(new kiwano::ActionMoveTo(0, pos));
|
return TweenHelper(new kiwano::ActionMoveTo(dur, pos));
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline TweenHelper
|
static inline TweenHelper
|
||||||
JumpBy(
|
JumpBy(
|
||||||
|
Duration dur,
|
||||||
Point const& pos, /* 目的坐标 */
|
Point const& pos, /* 目的坐标 */
|
||||||
float height, /* 跳跃高度 */
|
float height, /* 跳跃高度 */
|
||||||
int jumps = 1) /* 跳跃次数 */
|
int jumps = 1) /* 跳跃次数 */
|
||||||
{
|
{
|
||||||
return TweenHelper(new kiwano::ActionJumpBy(0, pos, height, jumps));
|
return TweenHelper(new kiwano::ActionJumpBy(dur, pos, height, jumps));
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline TweenHelper
|
static inline TweenHelper
|
||||||
JumpTo(
|
JumpTo(
|
||||||
|
Duration dur,
|
||||||
Point const& pos, /* 目的坐标 */
|
Point const& pos, /* 目的坐标 */
|
||||||
float height, /* 跳跃高度 */
|
float height, /* 跳跃高度 */
|
||||||
int jumps = 1) /* 跳跃次数 */
|
int jumps = 1) /* 跳跃次数 */
|
||||||
{
|
{
|
||||||
return TweenHelper(new kiwano::ActionJumpTo(0, pos, height, jumps));
|
return TweenHelper(new kiwano::ActionJumpTo(dur, pos, height, jumps));
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline TweenHelper
|
static inline TweenHelper
|
||||||
ScaleBy(float scale)
|
ScaleBy(Duration dur, float scale)
|
||||||
{
|
{
|
||||||
return TweenHelper(new kiwano::ActionScaleBy(0, scale));
|
return TweenHelper(new kiwano::ActionScaleBy(dur, scale));
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline TweenHelper
|
static inline TweenHelper
|
||||||
ScaleBy(float scale_x, float scale_y)
|
ScaleBy(Duration dur, float scale_x, float scale_y)
|
||||||
{
|
{
|
||||||
return TweenHelper(new kiwano::ActionScaleBy(0, scale_x, scale_y));
|
return TweenHelper(new kiwano::ActionScaleBy(dur, scale_x, scale_y));
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline TweenHelper
|
static inline TweenHelper
|
||||||
ScaleTo(float scale)
|
ScaleTo(Duration dur, float scale)
|
||||||
{
|
{
|
||||||
return TweenHelper(new kiwano::ActionScaleTo(0, scale));
|
return TweenHelper(new kiwano::ActionScaleTo(dur, scale));
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline TweenHelper
|
static inline TweenHelper
|
||||||
ScaleTo(float scale_x, float scale_y)
|
ScaleTo(Duration dur, float scale_x, float scale_y)
|
||||||
{
|
{
|
||||||
return TweenHelper(new kiwano::ActionScaleTo(0, scale_x, scale_y));
|
return TweenHelper(new kiwano::ActionScaleTo(dur, scale_x, scale_y));
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline TweenHelper
|
static inline TweenHelper
|
||||||
FadeTo(float opacity)
|
FadeTo(Duration dur, float opacity)
|
||||||
{
|
{
|
||||||
return TweenHelper(new kiwano::ActionFadeTo(0, opacity));
|
return TweenHelper(new kiwano::ActionFadeTo(dur, opacity));
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline TweenHelper
|
static inline TweenHelper
|
||||||
|
|
@ -172,27 +174,27 @@ namespace kiwano
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline TweenHelper
|
static inline TweenHelper
|
||||||
RotateBy(float rotation)
|
RotateBy(Duration dur, float rotation)
|
||||||
{
|
{
|
||||||
return TweenHelper(new kiwano::ActionRotateBy(0, rotation));
|
return TweenHelper(new kiwano::ActionRotateBy(dur, rotation));
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline TweenHelper
|
static inline TweenHelper
|
||||||
RotateTo(float rotation)
|
RotateTo(Duration dur, float rotation)
|
||||||
{
|
{
|
||||||
return TweenHelper(new kiwano::ActionRotateTo(0, rotation));
|
return TweenHelper(new kiwano::ActionRotateTo(dur, rotation));
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline TweenHelper
|
static inline TweenHelper
|
||||||
Animation(FrameSequencePtr frames)
|
Animation(Duration dur, FrameSequencePtr frames)
|
||||||
{
|
{
|
||||||
return TweenHelper(new kiwano::Animation(0, frames));
|
return TweenHelper(new kiwano::Animation(dur, frames));
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline TweenHelper
|
static inline TweenHelper
|
||||||
Custom(kiwano::ActionCustom::TweenFunc tween_func)
|
Custom(Duration dur, ActionCustom::TweenFunc tween_func)
|
||||||
{
|
{
|
||||||
return TweenHelper(new kiwano::ActionCustom(0, tween_func));
|
return TweenHelper(new kiwano::ActionCustom(dur, tween_func));
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline ActionHelper
|
static inline ActionHelper
|
||||||
|
|
@ -226,9 +228,9 @@ namespace kiwano
|
||||||
|
|
||||||
KGE_DEPRECATED("Tween::OpacityTo is deprecated, use Tween::FadeTo instead")
|
KGE_DEPRECATED("Tween::OpacityTo is deprecated, use Tween::FadeTo instead")
|
||||||
static inline TweenHelper
|
static inline TweenHelper
|
||||||
OpacityTo(float opacity)
|
OpacityTo(Duration dur, float opacity)
|
||||||
{
|
{
|
||||||
return TweenHelper(new kiwano::ActionFadeTo(0, opacity));
|
return TweenHelper(new kiwano::ActionFadeTo(dur, opacity));
|
||||||
}
|
}
|
||||||
|
|
||||||
KGE_DEPRECATED("Tween::Sequence is deprecated, use Tween::Group instead")
|
KGE_DEPRECATED("Tween::Sequence is deprecated, use Tween::Group instead")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue