#pragma once #include "npc/NpcDataLoader.h" #include #include #include namespace frostbite2D { class NpcAnimation : public Actor { public: bool Init(const npc::NpcConfig& config); void SetDirection(int direction); bool IsReady() const { return displayAnimation_ != nullptr; } bool IsAnimationFinished() const; const std::string& GetAnimationPath() const { return animationPath_; } bool GetDisplayLocalBounds(Rect& outBounds) const; private: RefPtr displayAnimation_ = nullptr; std::string animationPath_; int direction_ = 1; }; } // namespace frostbite2D