| 1 | #include "Layout/MiniGameCueLayout.h" |
| 2 | |
| 3 | #include "Library/Layout/LayoutActionFunction.h" |
| 4 | #include "Library/Layout/LayoutActorUtil.h" |
| 5 | #include "Library/Layout/LayoutInitInfo.h" |
| 6 | #include "Library/Nerve/NerveSetupUtil.h" |
| 7 | #include "Library/Nerve/NerveUtil.h" |
| 8 | |
| 9 | namespace { |
| 10 | NERVE_IMPL(MiniGameCueLayout, Wait); |
| 11 | NERVE_IMPL(MiniGameCueLayout, Appear); |
| 12 | |
| 13 | NERVES_MAKE_NOSTRUCT(MiniGameCueLayout, Wait, Appear); |
| 14 | } // namespace |
| 15 | |
| 16 | MiniGameCueLayout::MiniGameCueLayout(const char* name, const al::LayoutInitInfo& info) |
| 17 | : al::LayoutActor(name) { |
| 18 | al::initLayoutActor(this, info, "MiniGameCue" , nullptr); |
| 19 | initNerve(&Wait, 0); |
| 20 | kill(); |
| 21 | } |
| 22 | |
| 23 | void MiniGameCueLayout::appearMiss() { |
| 24 | al::setNerve(user: this, nerve: &Appear); |
| 25 | al::startAction(layout: this, actionName: "Miss" , paneName: nullptr); |
| 26 | appear(); |
| 27 | } |
| 28 | |
| 29 | void MiniGameCueLayout::appearCount(s32 count) { |
| 30 | al::setPaneNumberDigit1(this, "TxtCount" , count, 0); |
| 31 | al::setNerve(user: this, nerve: &Appear); |
| 32 | al::startAction(layout: this, actionName: "Count" , paneName: nullptr); |
| 33 | appear(); |
| 34 | } |
| 35 | |
| 36 | void MiniGameCueLayout::appearGo() { |
| 37 | al::setNerve(user: this, nerve: &Appear); |
| 38 | al::startAction(layout: this, actionName: "Go" , paneName: nullptr); |
| 39 | appear(); |
| 40 | } |
| 41 | |
| 42 | void MiniGameCueLayout::appearFinish() { |
| 43 | al::setNerve(user: this, nerve: &Appear); |
| 44 | al::startAction(layout: this, actionName: "Finish" , paneName: nullptr); |
| 45 | appear(); |
| 46 | } |
| 47 | |
| 48 | void MiniGameCueLayout::exeWait() {} |
| 49 | |
| 50 | void MiniGameCueLayout::exeAppear() { |
| 51 | if (al::isActionEnd(layout: this, paneName: nullptr)) |
| 52 | kill(); |
| 53 | } |
| 54 | |