mirror of
https://github.com/MonsterDruide1/OdysseyDecomp
synced 2026-04-23 09:04:21 +00:00
29 lines
887 B
C++
29 lines
887 B
C++
#include "Library/Event/EventFlowNodeActionOneTime.h"
|
|
|
|
#include "Library/Event/EventFlowFunction.h"
|
|
#include "Library/Event/EventFlowUtil.h"
|
|
#include "Library/LiveActor/ActorActionFunction.h"
|
|
|
|
namespace al {
|
|
EventFlowNodeActionOneTime::EventFlowNodeActionOneTime(const char* name) : EventFlowNode(name) {}
|
|
|
|
void EventFlowNodeActionOneTime::init(const EventFlowNodeInitInfo& info) {
|
|
initEventFlowNode(this, info);
|
|
mActionName = getParamIterKeyString(info, "ActionName");
|
|
tryGetParamIterKeyFloat(&mActionFrameRate, info, "ActionFrameRate");
|
|
}
|
|
|
|
void EventFlowNodeActionOneTime::start() {
|
|
EventFlowNode::start();
|
|
startEventAction(getActor(), this, mActionName);
|
|
|
|
if (mActionFrameRate > 0.0f)
|
|
setActionFrameRate(getActor(), mActionFrameRate);
|
|
}
|
|
|
|
void EventFlowNodeActionOneTime::control() {
|
|
if (isActionEnd(getActor()))
|
|
end();
|
|
}
|
|
} // namespace al
|