diff options
author | chai <chaifix@163.com> | 2019-01-19 01:44:05 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2019-01-19 01:44:05 +0800 |
commit | 91e589d1678a8187c307e09b98b67ec4133092ff (patch) | |
tree | ee2761f047568ca7164b27399c0b2fb2f21c26b0 /Source/Asura.Engine/Graphics/Animation.cpp | |
parent | 91346d709abb37a063d0c29ddeb2d1a849d3afc2 (diff) |
*游戏框架改用脚本实现
Diffstat (limited to 'Source/Asura.Engine/Graphics/Animation.cpp')
-rw-r--r-- | Source/Asura.Engine/Graphics/Animation.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Source/Asura.Engine/Graphics/Animation.cpp b/Source/Asura.Engine/Graphics/Animation.cpp new file mode 100644 index 0000000..47643aa --- /dev/null +++ b/Source/Asura.Engine/Graphics/Animation.cpp @@ -0,0 +1,21 @@ +#include "Animation.h" + +namespace AsuraEngine +{ + namespace Graphics + { + + void Animation::OnEnable() + { + mSpriteRenderer = mGameObject->GetComponent<SpriteRenderer*>(); + } + + void Animation::OnUpdate(uint32 milliseconds) + { + if (!mSpriteRenderer) + return; + mSpriteRenderer->SetSprite(NULL); + } + + } +} |