CSEngine
Loading...
Searching...
No Matches
Animation.cpp
1//
2// Created by ounols on 19. 9. 15.
3//
4
5#include "Animation.h"
6#include "../Loader/DAE/DAELoader.h"
7#include "../../Manager/EngineCore.h"
8
9using namespace CSE;
10
11void Animation::SetKeyframe(float totalTime, std::list<KeyFrame*> keyframes) {
12 m_length = totalTime;
13 m_keyframes = std::move(keyframes);
14}
15
16void Animation::Exterminate() {
17 for(auto keyframe : m_keyframes) {
18 SAFE_DELETE(keyframe);
19 }
20 m_keyframes.clear();
21}
22
23void Animation::Init(const AssetMgr::AssetReference* asset) {
24 std::string parent_id = split(asset->id, '?')[0];
25 CORE->GetCore(ResMgr)->GetAssetReference(parent_id);
26
27}