1#include "Layout/PlayGuideMap.h"
2
3#include "Library/Layout/LayoutActorUtil.h"
4#include "Library/Nerve/NerveSetupUtil.h"
5#include "Library/Nerve/NerveUtil.h"
6#include "Library/Play/Layout/SimpleLayoutAppearWaitEnd.h"
7
8#include "Layout/MapLayout.h"
9
10namespace {
11NERVE_IMPL(PlayGuideMap, Hide);
12NERVE_IMPL(PlayGuideMap, End);
13NERVE_IMPL(PlayGuideMap, Show);
14
15NERVES_MAKE_NOSTRUCT(PlayGuideMap, Show);
16NERVES_MAKE_STRUCT(PlayGuideMap, Hide, End);
17} // namespace
18
19PlayGuideMap::PlayGuideMap(const char* name, const al::LayoutInitInfo& info)
20 : al::NerveExecutor(name) {
21 mLayout = new al::SimpleLayoutAppearWaitEnd("[シーン情報]地図操作説明", "PlayGuideMap", info,
22 nullptr, false);
23 al::killLayoutIfActive(mLayout);
24 initNerve(nerve: &NrvPlayGuideMap.Hide, stateCount: 0);
25}
26
27void PlayGuideMap::start() {
28 if (al::isNerve(user: this, nerve: &NrvPlayGuideMap.End))
29 al::setNerve(user: this, nerve: &NrvPlayGuideMap.Hide);
30}
31
32void PlayGuideMap::end() {
33 if (!al::isNerve(user: this, nerve: &NrvPlayGuideMap.End))
34 al::setNerve(user: this, nerve: &NrvPlayGuideMap.End);
35}
36
37void PlayGuideMap::endImmediate() {
38 al::killLayoutIfActive(mLayout);
39 al::setNerve(user: this, nerve: &NrvPlayGuideMap.End);
40}
41
42void PlayGuideMap::exeHide() {
43 if (rs::isEnableCheckpointWarp(mLayout))
44 al::setNerve(user: this, nerve: &Show);
45}
46
47void PlayGuideMap::exeShow() {
48 if (al::isFirstStep(user: this))
49 mLayout->appear();
50}
51
52void PlayGuideMap::exeEnd() {
53 if (al::isFirstStep(user: this))
54 mLayout->end();
55}
56