1#include "Game/MapObj/DeadLeaves.hpp"
2#include "Game/MapObj/MapObjActorInitInfo.hpp"
4DeadLeaves::DeadLeaves(
const char *pName) :
MapObjActor(pName) {
11 MapObjActorUtil::setupInitInfoSimpleMapObj(&info);
12 info.setupHitSensor();
17 info.setupHitSensorParam(8, 70.0f, sensor);
18 info.setupNerve(&NrvDeadLeaves::DeadLeavesNrvWait::sInstance);
19 initialize(rIter, info);
20 MR::getJMapInfoArg0NoInit(rIter, &mItemType);
23 MR::declareCoin(
this, 1);
25 else if (mItemType == 1) {
26 MR::declareStarPiece(
this, 3);
30void DeadLeaves::exeSpin() {
31 if (MR::isFirstStep(
this)) {
32 MR::startAllAnim(
this,
"Spin");
33 MR::startSound(
this,
"SE_OJ_LEAVES_SWING", -1, -1);
38 else if (mItemType == 1) {
39 bool appear = MR::appearStarPiece(
this,
mPosition, 3, 10.0f, 40.0f,
false);
41 MR::startSound(
this,
"SE_OJ_STAR_PIECE_BURST", -1, -1);
46 if (MR::isBckStopped(
this)) {
47 setNerve(&NrvDeadLeaves::DeadLeavesNrvWait::sInstance);
52 if (MR::isMsgPlayerSpinAttack(msg)) {
53 setNerve(&NrvDeadLeaves::DeadLeavesNrvSpin::sInstance);
60DeadLeaves::~DeadLeaves() {
64namespace NrvDeadLeaves {
65 INIT_NERVE(DeadLeavesNrvWait);
66 INIT_NERVE(DeadLeavesNrvSpin);
68 void DeadLeavesNrvSpin::execute(
Spine *pSpine)
const {
73 void DeadLeavesNrvWait::execute(
Spine *pSpine)
const {
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.