1#include "Game/Map/Halo.hpp"
24 MapObjActor::appear();
26 if (isDistanceDisappear()) {
27 const char* anim =
"Disappear";
28 MR::tryStartAllAnim(
this, anim);
29 if (MR::isExistBtk(
this, anim)) {
30 J3DFrameCtrl* ctrl = MR::getBtkCtrl(
this);
31 MR::setBtkFrame(
this, ctrl->mEndFrame);
34 if (MR::isExistBpk(
this, anim)) {
35 J3DFrameCtrl* ctrl = MR::getBpkCtrl(
this);
36 MR::setBpkFrame(
this, ctrl->mEndFrame);
39 if (MR::isExistBtp(
this, anim)) {
40 J3DFrameCtrl* ctrl = MR::getBtpCtrl(
this);
41 MR::setBpkFrame(
this, ctrl->mEndFrame);
44 if (MR::isExistBrk(
this, anim)) {
45 J3DFrameCtrl* ctrl = MR::getBrkCtrl(
this);
46 MR::setBrkFrame(
this, ctrl->mEndFrame);
50 setNerve(&NrvHalo::HostTypeDisappear::sInstance);
53 MR::startAllAnim(
this,
"Appear");
54 setNerve(&NrvHalo::HostTypeAppear::sInstance);
58f32 Halo::getDistance()
const {
59 return MR::calcDistanceToPlayer(
this);
63 MR::connectToSceneAir(
this);
66bool Halo::isDistanceAppear()
const {
67 f32 v1 = (mDistance + 20.0f) * 100.0f;
69 f32 d = mDistance * 100.0f;
71 return v1 < getDistance();
74 return getDistance() < v1;
92void Halo::exeDisappear() {
93 if (!MR::isHiddenModel(
this)) {
95 const char* anim =
"Disappear";
97 if (MR::isExistBtk(
this, anim) && MR::isBtkStopped(
this)) {
100 else if (MR::isExistBpk(
this, anim) && MR::isBpkStopped(
this)) {
103 else if (MR::isExistBtp(
this, anim) && MR::isBtpStopped(
this)) {
106 else if (MR::isExistBrk(
this, anim) && MR::isBrkStopped(
this)) {
118 if (isDistanceAppear()) {
120 MR::startAllAnim(
this,
"Appear");
121 setNerve(&NrvHalo::HostTypeAppear::sInstance);
125PowerStarHalo::PowerStarHalo(
const char *pName) :
Halo(pName) {
135 MR::getJMapInfoArg1NoInit(rIter, &_C8);
137 setNerve(&NrvPowerStarHalo::HostTypeWaitScenarioOpeningEnd::sInstance);
141void PowerStarHalo::appear() {
142 if (isNerve(&NrvPowerStarHalo::HostTypeWaitScenarioOpeningEnd::sInstance)) {
150f32 PowerStarHalo::getDistance()
const {
151 TVec3f pos = MR::getCamPos();
152 return PSVECDistance(
mPosition.toCVec(), pos.toCVec());
155void PowerStarHalo::exeWaitScenarioOpeningEnd() {
156 if (MR::isFirstStep(
this)) {
160 if (!MR::isStageStateScenarioOpeningCamera()) {
166PowerStarHalo::~PowerStarHalo() {
171void NrvPowerStarHalo::HostTypeWaitScenarioOpeningEnd::execute(
Spine *pSpine)
const {
173 halo->exeWaitScenarioOpeningEnd();
176void NrvHalo::HostTypeDisappear::execute(
Spine *pSpine)
const {
177 Halo* halo =
reinterpret_cast<Halo*
>(pSpine->mExecutor);
178 halo->exeDisappear();
181void NrvHalo::HostTypeAppear::execute(
Spine *pSpine)
const {
182 Halo* halo =
reinterpret_cast<Halo*
>(pSpine->mExecutor);
183 if (halo->isDistanceDisappear()) {
184 MR::startAllAnim(halo,
"Disappear");
185 halo->setNerve(&NrvHalo::HostTypeDisappear::sInstance);
virtual void init(const JMapInfoIter &)
Intializes the NameObj and can set various settings and construct necessary classes.
TVec3f mPosition
3D vector of the actor's position.
virtual void init(const JMapInfoIter &)
Intializes the NameObj and can set various settings and construct necessary classes.