CoriEngine
Loading...
Searching...
No Matches
Cori::World::Systems::Animation Class Referencefinal

System that is responsible for Animations, every Scene has it by default. More...

#include <Animation.hpp>

Inheritance diagram for Cori::World::Systems::Animation:
Collaboration diagram for Cori::World::Systems::Animation:

Public Member Functions

void OnTickUpdate (Core::GameTimer &gameTimer) override
std::optional< EntityPlayAnimation (const glm::vec2 position, const int16_t depth, const glm::vec2 scale, const float rotation, const Graphics::IsAnimationWithParams auto &... sequence)
 Allows you to play animation sequence without having an entity to do so on. Fire and forget style.
bool Create ()
virtual void OnUpdate (Core::GameTimer &gameTimer)
virtual void OnImGuiRender (Core::GameTimer &gameTimer)

Static Public Attributes

static constexpr SystemPriority Priority = 200

Protected Attributes

SceneHandle m_Owner { nullptr }

Detailed Description

System that is responsible for Animations, every Scene has it by default.

Definition at line 17 of file WorldSystem/Systems/Animation.hpp.

Member Function Documentation

◆ Create()

bool Cori::World::Systems::Animation::Create ( )

Definition at line 17 of file WorldSystem/Systems/Animation.cpp.

Here is the call graph for this function:

◆ OnImGuiRender()

virtual void Cori::World::System::OnImGuiRender ( Core::GameTimer & gameTimer)
inlinevirtualinherited

Definition at line 35 of file System.hpp.

◆ OnTickUpdate()

void Cori::World::Systems::Animation::OnTickUpdate ( Core::GameTimer & gameTimer)
overridevirtual

Reimplemented from Cori::World::System.

Definition at line 7 of file WorldSystem/Systems/Animation.cpp.

Here is the call graph for this function:

◆ OnUpdate()

virtual void Cori::World::System::OnUpdate ( Core::GameTimer & gameTimer)
inlinevirtualinherited

Reimplemented in Cori::World::Systems::Transform.

Definition at line 31 of file System.hpp.

◆ PlayAnimation()

std::optional< Entity > Cori::World::Systems::Animation::PlayAnimation ( const glm::vec2 position,
const int16_t depth,
const glm::vec2 scale,
const float rotation,
const Graphics::IsAnimationWithParams auto &... sequence )
inline

Allows you to play animation sequence without having an entity to do so on. Fire and forget style.

Internally it still uses an entity to play an animations on, but you don't have to worry about the entity creation and lifetime. It uses DisposableEntityPool so entities are reused.

Parameters
positionLocal position of the transform component of the entity the animation sequence will be played on.
depthLocal depth of the transform component of the entity the animation sequence will be played on.
scaleLocal scale of the transform component of the entity the animation sequence will be played on.
rotationLocal rotation of the transform component of the entity the animation sequence will be played on.
sequenceAnimation sequence to play.
Returns
Optional object containing an entity that will be used to play an animation, or empty if all entities are currently busy.
Note
You can increase entity pool size by defining CORI_DISPOSABLE_ANIMATION_POOL_SIZE in the GlobalDefines.hpp file.

Definition at line 33 of file WorldSystem/Systems/Animation.hpp.

Here is the call graph for this function:

Member Data Documentation

◆ m_Owner

SceneHandle Cori::World::System::m_Owner { nullptr }
protectedinherited

Definition at line 38 of file System.hpp.

◆ Priority

SystemPriority Cori::World::Systems::Animation::Priority = 200
staticconstexpr

Definition at line 60 of file WorldSystem/Systems/Animation.hpp.


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