Cogs.Core
AnimationComponent.h
1#pragma once
2
3#include "Resources/Resources.h"
4
5#include "Foundation/ComponentModel/Component.h"
6
7namespace Cogs
8{
9 namespace Core
10 {
17 {
20
22 int clipIndex = 0;
23
25 float timeFactor = 1.0f;
27 float timeOffset = 0.0f;
28
31
32 static void registerType();
33 };
34 }
35}
36
37template<> inline Cogs::StringView getName<Cogs::Core::AnimationComponent>() { return "AnimationComponent"; }
Base class for Component instances.
Definition: Component.h:143
Provides a weakly referenced view over the contents of a string.
Definition: StringView.h:24
Contains all Cogs related functionality.
Definition: FieldSetter.h:23
Handle to a Component instance.
Definition: Component.h:67
Component handling animation of multiple Poses of an Animation Resource.
float timeOffset
Animation time offset in seconds.
int clipIndex
Active index of the Animation Clips. -1 = freeze Animation.
AnimationHandle animation
Animation resource handle.
ComponentModel::ComponentHandle master
Internal handle of Master when animating. Handled by AnimationSystem.
float timeFactor
Animation Time Scale factor.