mirror of
https://github.com/MonsterDruide1/OdysseyDecomp
synced 2026-04-30 12:35:12 +00:00
54 lines
1.5 KiB
C++
54 lines
1.5 KiB
C++
#include "Library/Play/Layout/SimpleLayoutAppearWait.h"
|
|
|
|
#include "Library/Layout/LayoutActionFunction.h"
|
|
#include "Library/Layout/LayoutInitInfo.h"
|
|
#include "Library/Nerve/NerveSetupUtil.h"
|
|
#include "Library/Nerve/NerveUtil.h"
|
|
|
|
namespace {
|
|
using namespace al;
|
|
NERVE_IMPL(SimpleLayoutAppearWait, Appear);
|
|
NERVE_IMPL(SimpleLayoutAppearWait, Wait);
|
|
|
|
NERVES_MAKE_NOSTRUCT(SimpleLayoutAppearWait, Appear, Wait);
|
|
} // namespace
|
|
|
|
namespace al {
|
|
|
|
SimpleLayoutAppearWait::SimpleLayoutAppearWait(const char* name, const char* layoutName,
|
|
const LayoutInitInfo& info, const char* archiveName)
|
|
: LayoutActor(name) {
|
|
initLayoutActor(this, info, layoutName, archiveName);
|
|
initNerve(&Appear);
|
|
}
|
|
|
|
SimpleLayoutAppearWait::SimpleLayoutAppearWait(LayoutActor* parentActor, const char* name,
|
|
const char* layoutName, const LayoutInitInfo& info,
|
|
const char* archiveName)
|
|
: LayoutActor(name) {
|
|
initLayoutPartsActor(this, parentActor, info, layoutName, archiveName);
|
|
initNerve(&Appear);
|
|
}
|
|
|
|
void SimpleLayoutAppearWait::appear() {
|
|
startAction(this, "Appear");
|
|
LayoutActor::appear();
|
|
setNerve(this, &Appear);
|
|
}
|
|
|
|
bool SimpleLayoutAppearWait::isWait() const {
|
|
return isNerve(this, &Wait);
|
|
}
|
|
|
|
void SimpleLayoutAppearWait::exeAppear() {
|
|
if (isActionEnd(this, 0))
|
|
setNerve(this, &Wait);
|
|
}
|
|
|
|
void SimpleLayoutAppearWait::exeWait() {
|
|
if (isFirstStep(this))
|
|
startAction(this, "Wait");
|
|
}
|
|
|
|
} // namespace al
|