diff options
Diffstat (limited to 'Source/Asura.Engine/Graphics/Animation.h')
-rw-r--r-- | Source/Asura.Engine/Graphics/Animation.h | 128 |
1 files changed, 0 insertions, 128 deletions
diff --git a/Source/Asura.Engine/Graphics/Animation.h b/Source/Asura.Engine/Graphics/Animation.h deleted file mode 100644 index 391da22..0000000 --- a/Source/Asura.Engine/Graphics/Animation.h +++ /dev/null @@ -1,128 +0,0 @@ -#ifndef __AE_ANIMATION_H__ -#define __AE_ANIMATION_H__ - -#include "Sprite.h" -#include "Component.h" -#include "Manager.hpp" -#include "SpriteRenderer.h" -#include "Containers/Map.h" -#include "Containers/Vector.hpp" -#include "Containers/StringMap.hpp" -#include "Filesystem/Asset.h" - -namespace AsuraEngine -{ - namespace Graphics - { - - /// - /// ؼ֡ - /// - struct Frame - { - uint mask; // - float time; - Sprite* sprite; - }; - - /// - /// SpriteԸıspriteĴСתšimageAnimationͨanimatorġ - /// - class Animation final : public Filesystem::Asset - { - public: - - enum UpdateMask - { - Scale = 1, - Position = 1 << 1, - Rotation = 1 << 2, - Sprite = 1 << 3 - }; - - struct Definition - { - - }; - - /// - /// ʱһ֡ - /// - Frame GetFrame(float t); - - /// - /// ùؼ֡ - /// - uint GetKeyFrameCount(); - - /// - /// Ƿѭ - /// - uint GetLoop(); - - /// - /// ȡʱ - /// - uint GetDuration(); - - private: - - /// - /// ؼ֡ - /// - Containers::Vector<Frame> mFrames; - - /// - /// ʱ - /// - float mDuration; - - /// - /// Ƿѭ - /// - bool mLoop; - - /// - /// ID - /// - uint mID; - - UpdateMask mUpdateMask; - - }; - - class AnimationManager : public Manager - { - public: - - Containers::String GetAnimationName(uint ID); - - uint GetAnimationID(const Containers::String& name); - - Animation* GetAnimation(uint ID); - - Animation* GetAnimation(const Containers::String& name); - - /// - /// ӶID - /// - uint AddAnimation(Animation* animation); - - private: - - /// - /// ӳIDanimation - /// - Containers::StringMap<uint> mAnimationIDs; - - /// - /// ӳkeyanimation - /// - Containers::Map<uint, Animation*> mAnimations; - - }; - - } -} - -#endif
\ No newline at end of file |