System that is responsible for Animations, every Scene has it by default.
More...
#include <Animation.hpp>
System that is responsible for Animations, every Scene has it by default.
Definition at line 17 of file WorldSystem/Systems/Animation.hpp.
◆ Create()
| bool Cori::World::Systems::Animation::Create |
( |
| ) |
|
◆ OnImGuiRender()
| virtual void Cori::World::System::OnImGuiRender |
( |
Core::GameTimer & | gameTimer | ) |
|
|
inlinevirtualinherited |
◆ OnTickUpdate()
| void Cori::World::Systems::Animation::OnTickUpdate |
( |
Core::GameTimer & | gameTimer | ) |
|
|
overridevirtual |
◆ OnUpdate()
◆ 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
-
| position | Local position of the transform component of the entity the animation sequence will be played on. |
| depth | Local depth of the transform component of the entity the animation sequence will be played on. |
| scale | Local scale of the transform component of the entity the animation sequence will be played on. |
| rotation | Local rotation of the transform component of the entity the animation sequence will be played on. |
| sequence | Animation 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.
◆ m_Owner
◆ Priority
The documentation for this class was generated from the following files: