Leviathan  0.8.0.0
Leviathan game engine
Leviathan::Animated Class Reference

Entity plays animations on an Ogre::Item. More...

#include <Components.h>

+ Inheritance diagram for Leviathan::Animated:

Public Member Functions

DLLEXPORT Animated (RenderNode &node)
 
DLLEXPORT void Release ()
 
 REFERENCE_HANDLE_UNCOUNTED_TYPE (Animated)
 
- Public Member Functions inherited from Leviathan::Component
 Component (COMPONENT_TYPE type)
 
 Component (const Component &)=delete
 
Componentoperator= (const Component &)=delete
 

Public Attributes

ObjectAnimationHandler::pointer Animation
 Created animation component for this entity. More...
 
std::vector< SimpleAnimationAnimations
 
- Public Attributes inherited from Leviathan::Component
bool Marked
 
const COMPONENT_TYPE Type
 Type of this component, used for network serialization. More...
 

Static Public Attributes

static constexpr auto TYPE = COMPONENT_TYPE::Animated
 

Detailed Description

Entity plays animations on an Ogre::Item.

Definition at line 296 of file Components.h.

Constructor & Destructor Documentation

◆ Animated()

DLLEXPORT Animated::Animated ( RenderNode node)

Definition at line 344 of file Components.cpp.

344  : Component(TYPE)
345 {
346  Animation = ObjectAnimationHandler::MakeShared<ObjectAnimationHandler>(*node.Node);
347 }
ObjectAnimationHandler::pointer Animation
Created animation component for this entity.
Definition: Components.h:305
Component(COMPONENT_TYPE type)
Definition: Component.h:54
static constexpr auto TYPE
Definition: Components.h:312
SceneNode::pointer Node
Definition: Components.h:94

Member Function Documentation

◆ REFERENCE_HANDLE_UNCOUNTED_TYPE()

Leviathan::Animated::REFERENCE_HANDLE_UNCOUNTED_TYPE ( Animated  )

◆ Release()

DLLEXPORT void Animated::Release ( )

Definition at line 349 of file Components.cpp.

350 {
351  if(Animation)
352  Animation->DetachFromParent();
353  Animation = nullptr;
354 }
ObjectAnimationHandler::pointer Animation
Created animation component for this entity.
Definition: Components.h:305

Member Data Documentation

◆ Animation

ObjectAnimationHandler::pointer Leviathan::Animated::Animation

Created animation component for this entity.

Definition at line 305 of file Components.h.

◆ Animations

std::vector<SimpleAnimation> Leviathan::Animated::Animations

Playing animations

Note
When adding or removing (or changing the looping etc. properties) this needs to be marked

Definition at line 310 of file Components.h.

◆ TYPE

constexpr auto Leviathan::Animated::TYPE = COMPONENT_TYPE::Animated
static

Definition at line 312 of file Components.h.


The documentation for this class was generated from the following files: