1#include "Game/MapObj/UFOKinoko.hpp"
2#include "Game/MapObj/MapObjActor.hpp"
3#include "Game/MapObj/MapObjActorInitInfo.hpp"
4#include "Game/MapObj/StageEffectDataTable.hpp"
6UFOKinoko::UFOKinoko(
const char *pName) :
MapObjActor(pName) {
10UFOKinoko::~UFOKinoko() {
16 s32 argShadowType = -1;
17 MR::getMapPartsArgShadowType(&argShadowType, rIter);
18 bool hasShadow = !MR::isMapPartsShadowTypeNone(argShadowType);
20 info.setupHioNode(
"地形オブジェ");
21 info.setupDefaultPos();
22 info.setupConnectToScene();
23 info.setupEffect(
nullptr);
25 info.setupGroupClipping(64);
27 info.setupRailMover();
29 info.setupBaseMtxFollowTarget();
30 info.setupNerve(&NrvUFOKinoko::HostTypeWait::sInstance);
32 info.setupShadow(
nullptr);
34 MapObjActorUtil::setupInitInfoColorChangeArg0(&info, rIter);
36 MR::getJMapInfoArg7NoInit(rIter, &arg7);
38 info.setupNouseLodCtrl();
40 initialize(rIter, info);
41 MapObjActorUtil::startRotator(
this);
42 if (MR::isDemoCast(
this,
nullptr)) {
44 MR::tryRegisterDemoActionFunctor(
this, functor,
"UFOキノコ登場");
48void UFOKinoko::control() {
49 MapObjActor::control();
50 MR::StageEffect::tryStageEffectMoving(
this, mObjectName);
55 MR::listenStageSwitchOnB(
this, functor);
62void UFOKinoko::startMove() {
63 if (mRailMover !=
nullptr) {
64 MapObjActorUtil::startRailMover(
this);
66 setNerve(&NrvUFOKinoko::HostTypeMove::sInstance);
71 MR::getJMapInfoArg7NoInit(rIter, &arg7);
73 pArchiveList->addArchive(
"UFOKinokoLow");
77void UFOKinoko::exeMove() {
78 if (MR::isFirstStep(
this)) {
79 MR::StageEffect::tryStageEffectStart(
this, mObjectName);
80 MR::startSound(
this,
"SE_OJ_UFO_KINOKO_MOVE_ST", -1, -1);
82 MR::startLevelSound(
this,
"SE_OJ_LV_UFO_KINOKO_MOVE", -1, -1, -1);
83 if (mRailMover !=
nullptr && !MapObjActorUtil::isRailMoverWorking(
this)) {
84 setNerve(&NrvUFOKinoko::HostTypeStop::sInstance);
88void UFOKinoko::exeStop() {
89 if (MR::isFirstStep(
this)) {
90 MR::startSound(
this,
"SE_OJ_UFO_KINOKO_MOVE_ED", -1, -1);
91 MR::StageEffect::tryStageEffectStop(
this, mObjectName);
95namespace NrvUFOKinoko {
96 INIT_NERVE(HostTypeWait)
97 INIT_NERVE(HostTypeMove)
98 INIT_NERVE(HostTypeStop)
100 void HostTypeWait::execute(
Spine *pSpine)
const {
103 void HostTypeMove::execute(
Spine *pSpine)
const {
107 void HostTypeStop::execute(
Spine *pSpine)
const {
virtual void init(const JMapInfoIter &)
Intializes the NameObj and can set various settings and construct necessary classes.
Stores archive names of NameObjs.
virtual void init(const JMapInfoIter &)
Intializes the NameObj and can set various settings and construct necessary classes.