2019-04-11 14:40:54 +08:00
|
|
|
|
// Copyright (c) 2016-2018 Kiwano - Nomango
|
2019-03-31 01:37:06 +08:00
|
|
|
|
//
|
|
|
|
|
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
|
|
|
|
// of this software and associated documentation files (the "Software"), to deal
|
|
|
|
|
|
// in the Software without restriction, including without limitation the rights
|
|
|
|
|
|
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
|
|
|
// copies of the Software, and to permit persons to whom the Software is
|
|
|
|
|
|
// furnished to do so, subject to the following conditions:
|
|
|
|
|
|
//
|
|
|
|
|
|
// The above copyright notice and this permission notice shall be included in
|
|
|
|
|
|
// all copies or substantial portions of the Software.
|
|
|
|
|
|
//
|
|
|
|
|
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
|
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
|
|
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
|
|
|
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
|
|
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
|
|
|
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
|
|
|
|
// THE SOFTWARE.
|
|
|
|
|
|
|
|
|
|
|
|
#pragma once
|
2019-10-11 21:55:29 +08:00
|
|
|
|
#include <kiwano/2d/action/Action.h>
|
2019-11-13 14:33:15 +08:00
|
|
|
|
#include <kiwano/core/Logger.h>
|
2019-03-31 01:37:06 +08:00
|
|
|
|
|
2019-04-11 14:40:54 +08:00
|
|
|
|
namespace kiwano
|
2019-03-31 01:37:06 +08:00
|
|
|
|
{
|
2019-12-23 18:05:08 +08:00
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2019-09-29 22:23:13 +08:00
|
|
|
|
using EaseFunc = Function<float(float)>;
|
2019-03-31 01:37:06 +08:00
|
|
|
|
|
2019-12-23 18:05:08 +08:00
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ö<EFBFBD><C3B6>
|
|
|
|
|
|
/// @details <20>鿴 https://easings.net <20><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
2019-03-31 01:37:06 +08:00
|
|
|
|
struct Ease
|
|
|
|
|
|
{
|
2019-12-23 18:05:08 +08:00
|
|
|
|
static KGE_API EaseFunc Linear; ///< <20><><EFBFBD><EFBFBD>
|
|
|
|
|
|
static KGE_API EaseFunc EaseIn; ///< <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
static KGE_API EaseFunc EaseOut; ///< <20>ɿ<EFBFBD><C9BF><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
static KGE_API EaseFunc EaseInOut; ///< <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD>ɿ<EFBFBD><C9BF><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
static KGE_API EaseFunc ExpoIn; ///< <20><><EFBFBD><EFBFBD><EFBFBD>伫<EFBFBD><E4BCAB>
|
|
|
|
|
|
static KGE_API EaseFunc ExpoOut; ///< <20>ɼ<EFBFBD><C9BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
static KGE_API EaseFunc ExpoInOut; ///< <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD>ɼ<EFBFBD><C9BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
static KGE_API EaseFunc ElasticIn; ///< <20><><EFBFBD><EFBFBD><EFBFBD>㸳<EFBFBD>赯<EFBFBD><E8B5AF>
|
|
|
|
|
|
static KGE_API EaseFunc ElasticOut; ///< <20><><EFBFBD>յ㸳<D5B5>赯<EFBFBD><E8B5AF>
|
|
|
|
|
|
static KGE_API EaseFunc ElasticInOut; ///< <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>յ㸳<D5B5>赯<EFBFBD><E8B5AF>
|
|
|
|
|
|
static KGE_API EaseFunc BounceIn; ///< <20><><EFBFBD><EFBFBD><EFBFBD>㸳<EFBFBD>跴<EFBFBD><E8B7B4><EFBFBD><EFBFBD>
|
|
|
|
|
|
static KGE_API EaseFunc BounceOut; ///< <20><><EFBFBD>յ㸳<D5B5>跴<EFBFBD><E8B7B4><EFBFBD><EFBFBD>
|
|
|
|
|
|
static KGE_API EaseFunc BounceInOut; ///< <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>յ㸳<D5B5>跴<EFBFBD><E8B7B4><EFBFBD><EFBFBD>
|
2019-04-11 14:40:54 +08:00
|
|
|
|
static KGE_API EaseFunc BackIn;
|
|
|
|
|
|
static KGE_API EaseFunc BackOut;
|
|
|
|
|
|
static KGE_API EaseFunc BackInOut;
|
|
|
|
|
|
static KGE_API EaseFunc QuadIn;
|
|
|
|
|
|
static KGE_API EaseFunc QuadOut;
|
|
|
|
|
|
static KGE_API EaseFunc QuadInOut;
|
|
|
|
|
|
static KGE_API EaseFunc CubicIn;
|
|
|
|
|
|
static KGE_API EaseFunc CubicOut;
|
|
|
|
|
|
static KGE_API EaseFunc CubicInOut;
|
|
|
|
|
|
static KGE_API EaseFunc QuartIn;
|
|
|
|
|
|
static KGE_API EaseFunc QuartOut;
|
|
|
|
|
|
static KGE_API EaseFunc QuartInOut;
|
|
|
|
|
|
static KGE_API EaseFunc QuintIn;
|
|
|
|
|
|
static KGE_API EaseFunc QuintOut;
|
|
|
|
|
|
static KGE_API EaseFunc QuintInOut;
|
|
|
|
|
|
static KGE_API EaseFunc SineIn;
|
|
|
|
|
|
static KGE_API EaseFunc SineOut;
|
|
|
|
|
|
static KGE_API EaseFunc SineInOut;
|
2019-03-31 01:37:06 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-12-23 18:05:08 +08:00
|
|
|
|
KGE_DECLARE_SMART_PTR(ActionTween);
|
|
|
|
|
|
KGE_DECLARE_SMART_PTR(ActionMoveBy);
|
|
|
|
|
|
KGE_DECLARE_SMART_PTR(ActionMoveTo);
|
|
|
|
|
|
KGE_DECLARE_SMART_PTR(ActionJumpBy);
|
|
|
|
|
|
KGE_DECLARE_SMART_PTR(ActionJumpTo);
|
|
|
|
|
|
KGE_DECLARE_SMART_PTR(ActionScaleBy);
|
|
|
|
|
|
KGE_DECLARE_SMART_PTR(ActionScaleTo);
|
|
|
|
|
|
KGE_DECLARE_SMART_PTR(ActionFadeTo);
|
|
|
|
|
|
KGE_DECLARE_SMART_PTR(ActionFadeIn);
|
|
|
|
|
|
KGE_DECLARE_SMART_PTR(ActionFadeOut);
|
|
|
|
|
|
KGE_DECLARE_SMART_PTR(ActionRotateBy);
|
|
|
|
|
|
KGE_DECLARE_SMART_PTR(ActionRotateTo);
|
|
|
|
|
|
KGE_DECLARE_SMART_PTR(ActionCustom);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* \addtogroup Actions
|
|
|
|
|
|
* @{
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD>䶯<EFBFBD><E4B6AF>
|
2019-04-11 14:40:54 +08:00
|
|
|
|
class KGE_API ActionTween
|
2019-03-31 01:37:06 +08:00
|
|
|
|
: public Action
|
|
|
|
|
|
{
|
|
|
|
|
|
public:
|
|
|
|
|
|
ActionTween();
|
|
|
|
|
|
|
2019-12-23 18:05:08 +08:00
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD>䶯<EFBFBD><E4B6AF>
|
|
|
|
|
|
/// @param duration <20><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>
|
|
|
|
|
|
/// @param func <20><><EFBFBD><EFBFBD><EFBFBD>ٶȻ<D9B6><C8BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
ActionTween(Duration duration, EaseFunc func);
|
2019-03-31 01:37:06 +08:00
|
|
|
|
|
2019-12-23 18:05:08 +08:00
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>
|
2019-03-31 01:37:06 +08:00
|
|
|
|
Duration GetDuration() const;
|
|
|
|
|
|
|
2019-12-23 18:05:08 +08:00
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD>ö<EFBFBD><C3B6><EFBFBD>ʱ<EFBFBD><CAB1>
|
2019-03-31 01:37:06 +08:00
|
|
|
|
void SetDuration(Duration duration);
|
|
|
|
|
|
|
2019-12-23 18:05:08 +08:00
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD>ٶȻ<D9B6><C8BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
EaseFunc const& GetEaseFunc() const;
|
2019-03-31 01:37:06 +08:00
|
|
|
|
|
2019-12-23 18:05:08 +08:00
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD>ö<EFBFBD><C3B6><EFBFBD><EFBFBD>ٶȻ<D9B6><C8BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
void SetEaseFunc(EaseFunc const& func);
|
2019-03-31 01:37:06 +08:00
|
|
|
|
|
|
|
|
|
|
protected:
|
2019-12-23 18:05:08 +08:00
|
|
|
|
void Update(Actor* target, Duration dt) override;
|
|
|
|
|
|
|
|
|
|
|
|
virtual void UpdateTween(Actor* target, float percent) = 0;
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
2019-03-31 01:37:06 +08:00
|
|
|
|
Duration dur_;
|
|
|
|
|
|
EaseFunc ease_func_;
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-12-23 18:05:08 +08:00
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD><EFBFBD>λ<EFBFBD>ƶ<EFBFBD><C6B6><EFBFBD>
|
2019-04-11 14:40:54 +08:00
|
|
|
|
class KGE_API ActionMoveBy
|
2019-03-31 01:37:06 +08:00
|
|
|
|
: public ActionTween
|
|
|
|
|
|
{
|
|
|
|
|
|
public:
|
2019-12-23 18:05:08 +08:00
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD>ƶ<EFBFBD><C6B6><EFBFBD>
|
|
|
|
|
|
/// @param duration <20><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>
|
|
|
|
|
|
/// @param vector <20>ƶ<EFBFBD><C6B6><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
/// @param func <20><><EFBFBD><EFBFBD><EFBFBD>ٶȻ<D9B6><C8BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
ActionMoveBy(Duration duration, Vec2 const& vector, EaseFunc func = nullptr);
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><>ȡ<EFBFBD>ö<EFBFBD><C3B6><EFBFBD><EFBFBD>Ŀ<EFBFBD><C4BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2019-03-31 01:37:06 +08:00
|
|
|
|
ActionPtr Clone() const override;
|
|
|
|
|
|
|
2019-12-23 18:05:08 +08:00
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><>ȡ<EFBFBD>ö<EFBFBD><C3B6><EFBFBD><EFBFBD>ĵ<EFBFBD>ת
|
2019-03-31 01:37:06 +08:00
|
|
|
|
ActionPtr Reverse() const override;
|
|
|
|
|
|
|
|
|
|
|
|
protected:
|
2019-12-23 18:05:08 +08:00
|
|
|
|
void Init(Actor* target) override;
|
2019-03-31 01:37:06 +08:00
|
|
|
|
|
2019-12-23 18:05:08 +08:00
|
|
|
|
void UpdateTween(Actor* target, float percent) override;
|
2019-03-31 01:37:06 +08:00
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
Point start_pos_;
|
|
|
|
|
|
Point prev_pos_;
|
2019-12-23 18:05:08 +08:00
|
|
|
|
Vec2 delta_pos_;
|
2019-03-31 01:37:06 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-12-23 18:05:08 +08:00
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief λ<>ƶ<EFBFBD><C6B6><EFBFBD>
|
2019-04-11 14:40:54 +08:00
|
|
|
|
class KGE_API ActionMoveTo
|
2019-03-31 01:37:06 +08:00
|
|
|
|
: public ActionMoveBy
|
|
|
|
|
|
{
|
|
|
|
|
|
public:
|
2019-12-23 18:05:08 +08:00
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD><EFBFBD>λ<EFBFBD>ƶ<EFBFBD><C6B6><EFBFBD>
|
|
|
|
|
|
/// @param duration <20><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>
|
|
|
|
|
|
/// @param pos Ŀ<><C4BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
/// @param func <20><><EFBFBD><EFBFBD><EFBFBD>ٶȻ<D9B6><C8BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
ActionMoveTo(Duration duration, Point const& pos, EaseFunc func = nullptr);
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><>ȡ<EFBFBD>ö<EFBFBD><C3B6><EFBFBD><EFBFBD>Ŀ<EFBFBD><C4BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2019-03-31 01:37:06 +08:00
|
|
|
|
ActionPtr Clone() const override;
|
|
|
|
|
|
|
2019-12-23 18:05:08 +08:00
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><>ȡ<EFBFBD>ö<EFBFBD><C3B6><EFBFBD><EFBFBD>ĵ<EFBFBD>ת
|
2019-03-31 01:37:06 +08:00
|
|
|
|
virtual ActionPtr Reverse() const override
|
|
|
|
|
|
{
|
2019-12-17 20:47:55 +08:00
|
|
|
|
KGE_ERROR(L"Reverse() not supported in ActionMoveTo");
|
2019-03-31 01:37:06 +08:00
|
|
|
|
return nullptr;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
protected:
|
2019-12-23 18:05:08 +08:00
|
|
|
|
void Init(Actor* target) override;
|
2019-03-31 01:37:06 +08:00
|
|
|
|
|
2019-12-23 18:05:08 +08:00
|
|
|
|
private:
|
2019-03-31 01:37:06 +08:00
|
|
|
|
Point end_pos_;
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-12-23 18:05:08 +08:00
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ծ<EFBFBD><D4BE><EFBFBD><EFBFBD>
|
2019-04-11 14:40:54 +08:00
|
|
|
|
class KGE_API ActionJumpBy
|
2019-03-31 01:37:06 +08:00
|
|
|
|
: public ActionTween
|
|
|
|
|
|
{
|
|
|
|
|
|
public:
|
2019-12-23 18:05:08 +08:00
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ծ<EFBFBD><D4BE><EFBFBD><EFBFBD>
|
|
|
|
|
|
/// @param duration <20><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>
|
|
|
|
|
|
/// @param vec <20><>Ծλ<D4BE><CEBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
/// @param height <20><>Ծ<EFBFBD>߶<EFBFBD>
|
|
|
|
|
|
/// @param jumps <20><>Ծ<EFBFBD><D4BE><EFBFBD><EFBFBD>
|
|
|
|
|
|
/// @param func <20><><EFBFBD><EFBFBD><EFBFBD>ٶȻ<D9B6><C8BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
ActionJumpBy(Duration duration, Vec2 const& vec, float height, int jumps = 1, EaseFunc func = nullptr);
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><>ȡ<EFBFBD>ö<EFBFBD><C3B6><EFBFBD><EFBFBD>Ŀ<EFBFBD><C4BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2019-03-31 01:37:06 +08:00
|
|
|
|
ActionPtr Clone() const override;
|
|
|
|
|
|
|
2019-12-23 18:05:08 +08:00
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><>ȡ<EFBFBD>ö<EFBFBD><C3B6><EFBFBD><EFBFBD>ĵ<EFBFBD>ת
|
2019-03-31 01:37:06 +08:00
|
|
|
|
ActionPtr Reverse() const override;
|
|
|
|
|
|
|
|
|
|
|
|
protected:
|
2019-12-23 18:05:08 +08:00
|
|
|
|
void Init(Actor* target) override;
|
2019-03-31 01:37:06 +08:00
|
|
|
|
|
2019-12-23 18:05:08 +08:00
|
|
|
|
void UpdateTween(Actor* target, float percent) override;
|
2019-03-31 01:37:06 +08:00
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
Point start_pos_;
|
|
|
|
|
|
Point delta_pos_;
|
2019-09-29 22:23:13 +08:00
|
|
|
|
float height_;
|
|
|
|
|
|
int jumps_;
|
2019-03-31 01:37:06 +08:00
|
|
|
|
Point prev_pos_;
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-12-23 18:05:08 +08:00
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><>Ծ<EFBFBD><D4BE><EFBFBD><EFBFBD>
|
2019-04-11 14:40:54 +08:00
|
|
|
|
class KGE_API ActionJumpTo
|
2019-03-31 01:37:06 +08:00
|
|
|
|
: public ActionJumpBy
|
|
|
|
|
|
{
|
|
|
|
|
|
public:
|
2019-12-23 18:05:08 +08:00
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ծ<EFBFBD><D4BE><EFBFBD><EFBFBD>
|
|
|
|
|
|
/// @param duration <20><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>
|
|
|
|
|
|
/// @param pos Ŀ<><C4BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
/// @param height <20><>Ծ<EFBFBD>߶<EFBFBD>
|
|
|
|
|
|
/// @param jumps <20><>Ծ<EFBFBD><D4BE><EFBFBD><EFBFBD>
|
|
|
|
|
|
/// @param func <20><><EFBFBD><EFBFBD><EFBFBD>ٶȻ<D9B6><C8BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
ActionJumpTo(Duration duration, Point const& pos, float height, int jumps = 1, EaseFunc func = nullptr);
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><>ȡ<EFBFBD>ö<EFBFBD><C3B6><EFBFBD><EFBFBD>Ŀ<EFBFBD><C4BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2019-03-31 01:37:06 +08:00
|
|
|
|
ActionPtr Clone() const override;
|
|
|
|
|
|
|
2019-12-23 18:05:08 +08:00
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><>ȡ<EFBFBD>ö<EFBFBD><C3B6><EFBFBD><EFBFBD>ĵ<EFBFBD>ת
|
2019-03-31 01:37:06 +08:00
|
|
|
|
virtual ActionPtr Reverse() const override
|
|
|
|
|
|
{
|
2019-12-17 20:47:55 +08:00
|
|
|
|
KGE_ERROR(L"Reverse() not supported in ActionJumpTo");
|
2019-03-31 01:37:06 +08:00
|
|
|
|
return nullptr;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
protected:
|
2019-12-23 18:05:08 +08:00
|
|
|
|
void Init(Actor* target) override;
|
2019-03-31 01:37:06 +08:00
|
|
|
|
|
2019-12-23 18:05:08 +08:00
|
|
|
|
private:
|
2019-03-31 01:37:06 +08:00
|
|
|
|
Point end_pos_;
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-12-23 18:05:08 +08:00
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŷ<EFBFBD><C5B6><EFBFBD>
|
2019-04-11 14:40:54 +08:00
|
|
|
|
class KGE_API ActionScaleBy
|
2019-03-31 01:37:06 +08:00
|
|
|
|
: public ActionTween
|
|
|
|
|
|
{
|
|
|
|
|
|
public:
|
2019-12-23 18:05:08 +08:00
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŷ<EFBFBD><C5B6><EFBFBD>
|
|
|
|
|
|
/// @param duration <20><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>
|
|
|
|
|
|
/// @param scale_x <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա仯ֵ
|
|
|
|
|
|
/// @param scale_y <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա仯ֵ
|
|
|
|
|
|
/// @param func <20><><EFBFBD><EFBFBD><EFBFBD>ٶȻ<D9B6><C8BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
ActionScaleBy(Duration duration, float scale_x, float scale_y, EaseFunc func = nullptr);
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><>ȡ<EFBFBD>ö<EFBFBD><C3B6><EFBFBD><EFBFBD>Ŀ<EFBFBD><C4BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2019-03-31 01:37:06 +08:00
|
|
|
|
ActionPtr Clone() const override;
|
|
|
|
|
|
|
2019-12-23 18:05:08 +08:00
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><>ȡ<EFBFBD>ö<EFBFBD><C3B6><EFBFBD><EFBFBD>ĵ<EFBFBD>ת
|
2019-03-31 01:37:06 +08:00
|
|
|
|
ActionPtr Reverse() const override;
|
|
|
|
|
|
|
|
|
|
|
|
protected:
|
2019-12-23 18:05:08 +08:00
|
|
|
|
void Init(Actor* target) override;
|
2019-03-31 01:37:06 +08:00
|
|
|
|
|
2019-12-23 18:05:08 +08:00
|
|
|
|
void UpdateTween(Actor* target, float percent) override;
|
2019-03-31 01:37:06 +08:00
|
|
|
|
|
|
|
|
|
|
protected:
|
2019-09-29 22:23:13 +08:00
|
|
|
|
float start_scale_x_;
|
|
|
|
|
|
float start_scale_y_;
|
|
|
|
|
|
float delta_x_;
|
|
|
|
|
|
float delta_y_;
|
2019-03-31 01:37:06 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-12-23 18:05:08 +08:00
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD>Ŷ<EFBFBD><C5B6><EFBFBD>
|
2019-04-11 14:40:54 +08:00
|
|
|
|
class KGE_API ActionScaleTo
|
2019-03-31 01:37:06 +08:00
|
|
|
|
: public ActionScaleBy
|
|
|
|
|
|
{
|
|
|
|
|
|
public:
|
2019-12-23 18:05:08 +08:00
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŷ<EFBFBD><C5B6><EFBFBD>
|
|
|
|
|
|
/// @param duration <20><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>
|
|
|
|
|
|
/// @param scale_x <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ<EFBFBD><C4BF>ֵ
|
|
|
|
|
|
/// @param scale_y <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ<EFBFBD><C4BF>ֵ
|
|
|
|
|
|
/// @param func <20><><EFBFBD><EFBFBD><EFBFBD>ٶȻ<D9B6><C8BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
ActionScaleTo(Duration duration, float scale_x, float scale_y, EaseFunc func = nullptr);
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><>ȡ<EFBFBD>ö<EFBFBD><C3B6><EFBFBD><EFBFBD>Ŀ<EFBFBD><C4BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2019-03-31 01:37:06 +08:00
|
|
|
|
ActionPtr Clone() const override;
|
|
|
|
|
|
|
2019-12-23 18:05:08 +08:00
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><>ȡ<EFBFBD>ö<EFBFBD><C3B6><EFBFBD><EFBFBD>ĵ<EFBFBD>ת
|
2019-03-31 01:37:06 +08:00
|
|
|
|
virtual ActionPtr Reverse() const override
|
|
|
|
|
|
{
|
2019-12-17 20:47:55 +08:00
|
|
|
|
KGE_ERROR(L"Reverse() not supported in ActionScaleTo");
|
2019-03-31 01:37:06 +08:00
|
|
|
|
return nullptr;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
protected:
|
2019-12-23 18:05:08 +08:00
|
|
|
|
void Init(Actor* target) override;
|
2019-03-31 01:37:06 +08:00
|
|
|
|
|
2019-12-23 18:05:08 +08:00
|
|
|
|
private:
|
2019-09-29 22:23:13 +08:00
|
|
|
|
float end_scale_x_;
|
|
|
|
|
|
float end_scale_y_;
|
2019-03-31 01:37:06 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-12-23 18:05:08 +08:00
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <><CDB8><EFBFBD>Ƚ<EFBFBD><C8BD>䶯<EFBFBD><E4B6AF>
|
2019-07-29 12:56:17 +08:00
|
|
|
|
class KGE_API ActionFadeTo
|
|
|
|
|
|
: public ActionTween
|
2019-03-31 01:37:06 +08:00
|
|
|
|
{
|
|
|
|
|
|
public:
|
2019-12-23 18:05:08 +08:00
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD><EFBFBD><EFBFBD><CDB8><EFBFBD>Ƚ<EFBFBD><C8BD>䶯<EFBFBD><E4B6AF>
|
|
|
|
|
|
/// @param duration <20><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>
|
|
|
|
|
|
/// @param opacity Ŀ<><C4BF><EFBFBD><CDB8><EFBFBD><EFBFBD>
|
|
|
|
|
|
/// @param func <20><><EFBFBD><EFBFBD><EFBFBD>ٶȻ<D9B6><C8BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
ActionFadeTo(Duration duration, float opacity, EaseFunc func = nullptr);
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><>ȡ<EFBFBD>ö<EFBFBD><C3B6><EFBFBD><EFBFBD>Ŀ<EFBFBD><C4BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2019-03-31 01:37:06 +08:00
|
|
|
|
ActionPtr Clone() const override;
|
|
|
|
|
|
|
2019-12-23 18:05:08 +08:00
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><>ȡ<EFBFBD>ö<EFBFBD><C3B6><EFBFBD><EFBFBD>ĵ<EFBFBD>ת
|
2019-03-31 01:37:06 +08:00
|
|
|
|
virtual ActionPtr Reverse() const override
|
|
|
|
|
|
{
|
2019-12-17 20:47:55 +08:00
|
|
|
|
KGE_ERROR(L"Reverse() not supported in ActionFadeTo");
|
2019-03-31 01:37:06 +08:00
|
|
|
|
return nullptr;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
protected:
|
2019-12-23 18:05:08 +08:00
|
|
|
|
void Init(Actor* target) override;
|
2019-03-31 01:37:06 +08:00
|
|
|
|
|
2019-12-23 18:05:08 +08:00
|
|
|
|
void UpdateTween(Actor* target, float percent) override;
|
2019-07-29 12:56:17 +08:00
|
|
|
|
|
2019-12-23 18:05:08 +08:00
|
|
|
|
private:
|
2019-09-29 22:23:13 +08:00
|
|
|
|
float start_val_;
|
|
|
|
|
|
float delta_val_;
|
|
|
|
|
|
float end_val_;
|
2019-03-31 01:37:06 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-12-23 18:05:08 +08:00
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD>붯<EFBFBD><EBB6AF>
|
2019-04-11 14:40:54 +08:00
|
|
|
|
class KGE_API ActionFadeIn
|
2019-07-29 12:56:17 +08:00
|
|
|
|
: public ActionFadeTo
|
2019-03-31 01:37:06 +08:00
|
|
|
|
{
|
|
|
|
|
|
public:
|
2019-12-23 18:05:08 +08:00
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD>쵭<EFBFBD>붯<EFBFBD><EBB6AF>
|
|
|
|
|
|
/// @param duration <20><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>
|
|
|
|
|
|
/// @param func <20><><EFBFBD><EFBFBD><EFBFBD>ٶȻ<D9B6><C8BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
explicit ActionFadeIn(Duration duration, EaseFunc func = nullptr);
|
2019-03-31 01:37:06 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-12-23 18:05:08 +08:00
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2019-04-11 14:40:54 +08:00
|
|
|
|
class KGE_API ActionFadeOut
|
2019-07-29 12:56:17 +08:00
|
|
|
|
: public ActionFadeTo
|
2019-03-31 01:37:06 +08:00
|
|
|
|
{
|
|
|
|
|
|
public:
|
2019-12-23 18:05:08 +08:00
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD>쵭<EFBFBD><ECB5AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
/// @param duration <20><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>
|
|
|
|
|
|
/// @param func <20><><EFBFBD><EFBFBD><EFBFBD>ٶȻ<D9B6><C8BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
explicit ActionFadeOut(Duration duration, EaseFunc func = nullptr);
|
2019-03-31 01:37:06 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-12-23 18:05:08 +08:00
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ת<EFBFBD><D7AA><EFBFBD><EFBFBD>
|
2019-04-11 14:40:54 +08:00
|
|
|
|
class KGE_API ActionRotateBy
|
2019-03-31 01:37:06 +08:00
|
|
|
|
: public ActionTween
|
|
|
|
|
|
{
|
|
|
|
|
|
public:
|
2019-12-23 18:05:08 +08:00
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ת<EFBFBD><D7AA><EFBFBD><EFBFBD>
|
|
|
|
|
|
/// @param duration <20><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>
|
|
|
|
|
|
/// @param rotation <20>Ƕ<EFBFBD><C7B6><EFBFBD><EFBFBD>Ա仯ֵ
|
|
|
|
|
|
/// @param func <20><><EFBFBD><EFBFBD><EFBFBD>ٶȻ<D9B6><C8BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
ActionRotateBy(Duration duration, float rotation, EaseFunc func = nullptr);
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><>ȡ<EFBFBD>ö<EFBFBD><C3B6><EFBFBD><EFBFBD>Ŀ<EFBFBD><C4BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2019-03-31 01:37:06 +08:00
|
|
|
|
ActionPtr Clone() const override;
|
|
|
|
|
|
|
2019-12-23 18:05:08 +08:00
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><>ȡ<EFBFBD>ö<EFBFBD><C3B6><EFBFBD><EFBFBD>ĵ<EFBFBD>ת
|
2019-03-31 01:37:06 +08:00
|
|
|
|
ActionPtr Reverse() const override;
|
|
|
|
|
|
|
|
|
|
|
|
protected:
|
2019-12-23 18:05:08 +08:00
|
|
|
|
void Init(Actor* target) override;
|
2019-03-31 01:37:06 +08:00
|
|
|
|
|
2019-12-23 18:05:08 +08:00
|
|
|
|
void UpdateTween(Actor* target, float percent) override;
|
2019-03-31 01:37:06 +08:00
|
|
|
|
|
|
|
|
|
|
protected:
|
2019-09-29 22:23:13 +08:00
|
|
|
|
float start_val_;
|
|
|
|
|
|
float delta_val_;
|
2019-03-31 01:37:06 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-12-23 18:05:08 +08:00
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><>ת<EFBFBD><D7AA><EFBFBD><EFBFBD>
|
2019-04-11 14:40:54 +08:00
|
|
|
|
class KGE_API ActionRotateTo
|
2019-03-31 01:37:06 +08:00
|
|
|
|
: public ActionRotateBy
|
|
|
|
|
|
{
|
|
|
|
|
|
public:
|
2019-12-23 18:05:08 +08:00
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ת<EFBFBD><D7AA><EFBFBD><EFBFBD>
|
|
|
|
|
|
/// @param duration <20><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>
|
|
|
|
|
|
/// @param rotation Ŀ<><C4BF><EFBFBD>Ƕ<EFBFBD>
|
|
|
|
|
|
/// @param func <20><><EFBFBD><EFBFBD><EFBFBD>ٶȻ<D9B6><C8BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
ActionRotateTo(Duration duration, float rotation, EaseFunc func = nullptr);
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><>ȡ<EFBFBD>ö<EFBFBD><C3B6><EFBFBD><EFBFBD>Ŀ<EFBFBD><C4BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2019-03-31 01:37:06 +08:00
|
|
|
|
ActionPtr Clone() const override;
|
|
|
|
|
|
|
2019-12-23 18:05:08 +08:00
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><>ȡ<EFBFBD>ö<EFBFBD><C3B6><EFBFBD><EFBFBD>ĵ<EFBFBD>ת
|
2019-03-31 01:37:06 +08:00
|
|
|
|
virtual ActionPtr Reverse() const override
|
|
|
|
|
|
{
|
2019-12-17 20:47:55 +08:00
|
|
|
|
KGE_ERROR(L"Reverse() not supported in ActionRotateTo");
|
2019-03-31 01:37:06 +08:00
|
|
|
|
return nullptr;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
protected:
|
2019-12-23 18:05:08 +08:00
|
|
|
|
void Init(Actor* target) override;
|
2019-03-31 01:37:06 +08:00
|
|
|
|
|
2019-12-23 18:05:08 +08:00
|
|
|
|
private:
|
2019-09-29 22:23:13 +08:00
|
|
|
|
float end_val_;
|
2019-03-31 01:37:06 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-12-23 18:05:08 +08:00
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20>Զ<EFBFBD><D4B6>嶯<EFBFBD><E5B6AF>
|
2019-06-12 13:24:04 +08:00
|
|
|
|
class KGE_API ActionCustom
|
|
|
|
|
|
: public ActionTween
|
|
|
|
|
|
{
|
|
|
|
|
|
public:
|
2019-12-23 18:05:08 +08:00
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD><D8B5><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
/// @details <20>ڶ<EFBFBD><DAB6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD>ص<EFBFBD><D8B5>ú<EFBFBD><C3BA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ִ<EFBFBD>ж<EFBFBD><D0B6><EFBFBD><EFBFBD><EFBFBD>Ŀ<EFBFBD>꣬<EFBFBD>ڶ<EFBFBD><DAB6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƕ<EFBFBD><C7B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ<EFBFBD>0.0 - 1.0<EFBFBD><EFBFBD>
|
2019-12-25 18:07:57 +08:00
|
|
|
|
using TweenFunc = Function<void(Actor* /* target */, float /* percent */)>;
|
2019-12-23 18:05:08 +08:00
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD><EFBFBD><EFBFBD>Զ<EFBFBD><D4B6>嶯<EFBFBD><E5B6AF>
|
|
|
|
|
|
/// @param duration <20><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>
|
|
|
|
|
|
/// @param tween_func <20><><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD><D8B5><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
/// @param func <20><><EFBFBD><EFBFBD><EFBFBD>ٶȻ<D9B6><C8BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
ActionCustom(Duration duration, TweenFunc tween_func, EaseFunc func = nullptr);
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><>ȡ<EFBFBD>ö<EFBFBD><C3B6><EFBFBD><EFBFBD>Ŀ<EFBFBD><C4BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2019-06-12 13:24:04 +08:00
|
|
|
|
ActionPtr Clone() const override;
|
|
|
|
|
|
|
2019-12-23 18:05:08 +08:00
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><>ȡ<EFBFBD>ö<EFBFBD><C3B6><EFBFBD><EFBFBD>ĵ<EFBFBD>ת
|
2019-06-12 13:24:04 +08:00
|
|
|
|
ActionPtr Reverse() const override
|
|
|
|
|
|
{
|
2019-12-17 20:47:55 +08:00
|
|
|
|
KGE_ERROR(L"Reverse() not supported in ActionCustom");
|
2019-06-12 13:24:04 +08:00
|
|
|
|
return nullptr;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
protected:
|
2019-12-23 18:05:08 +08:00
|
|
|
|
void Init(Actor* target) override;
|
2019-06-12 13:24:04 +08:00
|
|
|
|
|
2019-12-23 18:05:08 +08:00
|
|
|
|
void UpdateTween(Actor* target, float percent) override;
|
2019-06-12 13:24:04 +08:00
|
|
|
|
|
2019-12-23 18:05:08 +08:00
|
|
|
|
private:
|
2019-06-12 13:24:04 +08:00
|
|
|
|
TweenFunc tween_func_;
|
|
|
|
|
|
};
|
|
|
|
|
|
|
2019-12-23 18:05:08 +08:00
|
|
|
|
/** @} */
|
|
|
|
|
|
|
2019-03-31 01:37:06 +08:00
|
|
|
|
}
|