Control over animation looping and event on animation completion
This commit is contained in:
@@ -4,6 +4,9 @@
|
||||
#include "Core/System.h"
|
||||
#include "Core/World.h"
|
||||
#include "Rendering/CAnimation.h"
|
||||
#include "Rendering/EAnimationComplete.h"
|
||||
#include "Rendering/CModel.h"
|
||||
#include "Rendering/Model.h"
|
||||
#include "Game/EPause.h"
|
||||
#include "Game/EResume.h"
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ struct Animation : Component
|
||||
std::string Name;
|
||||
double Time = 0.0;
|
||||
double Speed = 0.0;
|
||||
bool Loop = true;
|
||||
bool NoRootMotion = true;
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
#ifndef RENDERING_EANIMATIONCOMPLETE_H__
|
||||
#define RENDERING_EANIMATIONCOMPLETE_H__
|
||||
|
||||
#include "Core/Entity.h"
|
||||
#include "Core/EventBroker.h"
|
||||
|
||||
namespace dd
|
||||
{
|
||||
namespace Events
|
||||
{
|
||||
|
||||
struct AnimationComplete
|
||||
{
|
||||
EntityID Entity;
|
||||
std::string Animation;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user