mirror of
https://github.com/Jous99/F4MP.git
synced 2026-01-12 16:50:54 +01:00
23 lines
512 B
C
23 lines
512 B
C
#pragma once
|
|
|
|
#ifndef TP_INTERNAL_COMPONENTS_GUARD
|
|
#error Include Components.h instead
|
|
#endif
|
|
|
|
#include <Structs/ActionEvent.h>
|
|
|
|
struct LocalAnimationComponent
|
|
{
|
|
Vector<ActionEvent> Actions;
|
|
ActionEvent LastProcessedAction;
|
|
|
|
[[nodiscard]] Outcome<ActionEvent, bool> GetLatestAction() const noexcept
|
|
{
|
|
if (Actions.empty())
|
|
return false;
|
|
|
|
return Actions[Actions.size() - 1];
|
|
}
|
|
|
|
void Append(const ActionEvent& acEvent) noexcept { Actions.push_back(acEvent); }
|
|
};
|