2020-10-09 23:17:50 +08:00
|
|
|
|
// Copyright (c) 2016-2018 Kiwano - Nomango
|
|
|
|
|
|
//
|
|
|
|
|
|
// 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
|
|
|
|
|
|
#include <kiwano/core/Common.h>
|
2020-10-10 21:12:37 +08:00
|
|
|
|
#include <kiwano/core/Cloneable.h>
|
|
|
|
|
|
#include <kiwano/base/ObjectBase.h>
|
|
|
|
|
|
#include <kiwano/core/Time.h>
|
|
|
|
|
|
#include <kiwano/core/IntrusiveList.h>
|
|
|
|
|
|
#include <kiwano/math/Math.h>
|
2020-10-09 23:17:50 +08:00
|
|
|
|
|
|
|
|
|
|
namespace kiwano
|
|
|
|
|
|
{
|
2020-10-10 21:12:37 +08:00
|
|
|
|
class Actor;
|
|
|
|
|
|
class Animator;
|
2020-10-09 23:17:50 +08:00
|
|
|
|
|
2020-10-10 21:12:37 +08:00
|
|
|
|
KGE_DECLARE_SMART_PTR(Animation);
|
|
|
|
|
|
KGE_DECLARE_SMART_PTR(AnimationEventHandler);
|
2020-10-09 23:17:50 +08:00
|
|
|
|
|
2020-10-10 21:12:37 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* \~chinese
|
|
|
|
|
|
* \defgroup Animation <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
*/
|
2020-10-09 23:17:50 +08:00
|
|
|
|
|
2020-10-10 21:12:37 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* \addtogroup Animation
|
|
|
|
|
|
* @{
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD>
|
|
|
|
|
|
enum class AnimationEvent
|
|
|
|
|
|
{
|
|
|
|
|
|
Started, ///< <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ
|
|
|
|
|
|
LoopDone, ///< <20><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
Done, ///< <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2020-10-11 03:45:42 +08:00
|
|
|
|
class KGE_API AnimationEventHandler : public RefObject
|
2020-10-10 21:12:37 +08:00
|
|
|
|
{
|
|
|
|
|
|
public:
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD>
|
|
|
|
|
|
/// @param anim <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
/// @param target ִ<>ж<EFBFBD><D0B6><EFBFBD><EFBFBD>Ķ<EFBFBD><C4B6><EFBFBD>
|
|
|
|
|
|
/// @param evt <20><><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD>
|
|
|
|
|
|
virtual void Handle(Animation* anim, Actor* target, AnimationEvent evt) = 0;
|
2020-10-11 03:45:42 +08:00
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
/// @param handler <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC>ص<EFBFBD><D8B5><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
static AnimationEventHandlerPtr Create(const Function<void(Animation*, Actor*, AnimationEvent)>& handler);
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
/// @param evt <20><><EFBFBD><EFBFBD><EFBFBD>Ķ<EFBFBD><C4B6><EFBFBD><EFBFBD>¼<EFBFBD>
|
|
|
|
|
|
/// @param handler <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC>ص<EFBFBD><D8B5><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
static AnimationEventHandlerPtr Create(AnimationEvent evt, const Function<void(Animation*, Actor*)>& handler);
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD><EFBFBD>Started<65><64><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
/// @param handler <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC>ص<EFBFBD><D8B5><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
static AnimationEventHandlerPtr HandleStarted(const Function<void(Animation*, Actor*)>& handler);
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD><EFBFBD>LoopDone<6E><65><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
/// @param handler <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC>ص<EFBFBD><D8B5><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
static AnimationEventHandlerPtr HandleLoopDone(const Function<void(Animation*, Actor*)>& handler);
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD><EFBFBD>Done<6E><65><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
/// @param handler <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC>ص<EFBFBD><D8B5><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
static AnimationEventHandlerPtr HandleDone(const Function<void(Animation*, Actor*)>& handler);
|
2020-10-10 21:12:37 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>
|
|
|
|
|
|
typedef IntrusiveList<AnimationPtr> AnimationList;
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD><EFBFBD>
|
|
|
|
|
|
class KGE_API Animation
|
|
|
|
|
|
: public ObjectBase
|
|
|
|
|
|
, public Cloneable<Animation>
|
|
|
|
|
|
, protected IntrusiveListValue<AnimationPtr>
|
|
|
|
|
|
{
|
|
|
|
|
|
friend class Animator;
|
|
|
|
|
|
friend class AnimationGroup;
|
|
|
|
|
|
friend IntrusiveList<AnimationPtr>;
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
Animation();
|
|
|
|
|
|
|
|
|
|
|
|
virtual ~Animation();
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
void Resume();
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><>ͣ<EFBFBD><CDA3><EFBFBD><EFBFBD>
|
|
|
|
|
|
void Pause();
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief ֹͣ<CDA3><D6B9><EFBFBD><EFBFBD>
|
|
|
|
|
|
void Stop();
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD>ö<EFBFBD><C3B6><EFBFBD><EFBFBD><EFBFBD>ʱ
|
|
|
|
|
|
void SetDelay(Duration delay);
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD><EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
/// @param loops ѭ<><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-1 Ϊ<><CEAA><EFBFBD><EFBFBD>ѭ<EFBFBD><D1AD>
|
|
|
|
|
|
void SetLoops(int loops);
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD>Ƴ<EFBFBD>Ŀ<EFBFBD><C4BF><EFBFBD><EFBFBD>ɫ
|
|
|
|
|
|
void RemoveTargetWhenDone();
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD>ת
|
|
|
|
|
|
virtual Animation* Reverse() const = 0;
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬
|
|
|
|
|
|
bool IsRunning() const;
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
int GetLoops() const;
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ
|
|
|
|
|
|
Duration GetDelay() const;
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD>ö<EFBFBD><C3B6><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
void SetHandler(AnimationEventHandlerPtr handler);
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
AnimationEventHandlerPtr GetHandler() const;
|
|
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
virtual void Init(Actor* target);
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD>¶<EFBFBD><C2B6><EFBFBD>
|
|
|
|
|
|
virtual void Update(Actor* target, Duration dt);
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>ʱ<EFBFBD>䲽
|
|
|
|
|
|
void UpdateStep(Actor* target, Duration dt);
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD>ɶ<EFBFBD><C9B6><EFBFBD>
|
|
|
|
|
|
void Complete(Actor* target);
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD>ö<EFBFBD><C3B6><EFBFBD>
|
|
|
|
|
|
void Reset();
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD><EFBFBD>״̬
|
|
|
|
|
|
enum class Status
|
|
|
|
|
|
{
|
|
|
|
|
|
NotStarted, ///< δ<><CEB4>ʼ
|
|
|
|
|
|
Delayed, ///< <20>ȴ<EFBFBD><C8B4><EFBFBD>ʱ
|
|
|
|
|
|
Started, ///< <20>ѿ<EFBFBD>ʼ
|
|
|
|
|
|
Done, ///< <20>ѽ<EFBFBD><D1BD><EFBFBD>
|
|
|
|
|
|
Removeable ///< <20><><EFBFBD>Ƴ<EFBFBD>
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD>״̬
|
|
|
|
|
|
Status GetStatus() const;
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>
|
|
|
|
|
|
Duration GetElapsed() const;
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><>ȡ<EFBFBD><C8A1><EFBFBD>ɵ<EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
int GetLoopsDone() const;
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
void Done();
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20>Ƿ<EFBFBD><C7B7>ѽ<EFBFBD><D1BD><EFBFBD>
|
|
|
|
|
|
bool IsDone() const;
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD>Ƴ<EFBFBD>
|
|
|
|
|
|
bool IsRemoveable() const;
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD>
|
|
|
|
|
|
void EmitEvent(Actor* target, AnimationEvent evt);
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief ִ<>п<EFBFBD>¡
|
|
|
|
|
|
void DoClone(Animation* to) const;
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
Status status_;
|
|
|
|
|
|
bool running_;
|
|
|
|
|
|
bool detach_target_;
|
|
|
|
|
|
int loops_;
|
|
|
|
|
|
int loops_done_;
|
|
|
|
|
|
Duration delay_;
|
|
|
|
|
|
Duration elapsed_;
|
|
|
|
|
|
|
|
|
|
|
|
AnimationEventHandlerPtr handler_;
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/** @} */
|
|
|
|
|
|
|
|
|
|
|
|
inline void Animation::Resume()
|
|
|
|
|
|
{
|
|
|
|
|
|
running_ = true;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
inline void Animation::Pause()
|
|
|
|
|
|
{
|
|
|
|
|
|
running_ = false;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
inline void Animation::Stop()
|
|
|
|
|
|
{
|
|
|
|
|
|
Done();
|
2020-10-09 23:17:50 +08:00
|
|
|
|
}
|
2020-10-10 21:12:37 +08:00
|
|
|
|
|
|
|
|
|
|
inline void Animation::SetDelay(Duration delay)
|
|
|
|
|
|
{
|
|
|
|
|
|
delay_ = delay;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
inline void Animation::SetLoops(int loops)
|
|
|
|
|
|
{
|
|
|
|
|
|
loops_ = loops;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
inline void Animation::RemoveTargetWhenDone()
|
|
|
|
|
|
{
|
|
|
|
|
|
detach_target_ = true;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
inline void Animation::Done()
|
|
|
|
|
|
{
|
|
|
|
|
|
status_ = Status::Done;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
inline Animation::Status Animation::GetStatus() const
|
|
|
|
|
|
{
|
|
|
|
|
|
return status_;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
inline bool Animation::IsRunning() const
|
|
|
|
|
|
{
|
|
|
|
|
|
return running_;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
inline bool Animation::IsDone() const
|
|
|
|
|
|
{
|
|
|
|
|
|
return status_ == Status::Done || status_ == Status::Removeable;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
inline bool Animation::IsRemoveable() const
|
|
|
|
|
|
{
|
|
|
|
|
|
return status_ == Status::Removeable;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
inline void Animation::EmitEvent(Actor* target, AnimationEvent evt)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (handler_)
|
|
|
|
|
|
{
|
|
|
|
|
|
handler_->Handle(this, target, evt);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
inline int Animation::GetLoops() const
|
|
|
|
|
|
{
|
|
|
|
|
|
return loops_;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
inline Duration Animation::GetDelay() const
|
|
|
|
|
|
{
|
|
|
|
|
|
return delay_;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
inline void Animation::SetHandler(AnimationEventHandlerPtr handler)
|
|
|
|
|
|
{
|
|
|
|
|
|
handler_ = handler;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
inline AnimationEventHandlerPtr Animation::GetHandler() const
|
|
|
|
|
|
{
|
|
|
|
|
|
return handler_;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
inline Duration Animation::GetElapsed() const
|
|
|
|
|
|
{
|
|
|
|
|
|
return elapsed_;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
inline int Animation::GetLoopsDone() const
|
|
|
|
|
|
{
|
|
|
|
|
|
return loops_done_;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
} // namespace kiwano
|