1#include "Game/MapObj/KillerGunnerSingle.hpp"
3KillerGunnerSingle::KillerGunnerSingle(
const char *pName) :
LiveActor(pName) {
8 MR::initDefaultPos(
this, rIter);
9 initModelManagerWithAnm(
"KillerGunnerSingle",
nullptr,
false);
10 MR::connectToSceneEnvironment(
this);
16 MR::addHitSensorMapObj(
this,
"body", 0x10, 0.0f, sensor_offs);
18 TVec3f shell_sensor_offs(sShellPos);
19 MR::addHitSensorEnemy(
this,
"shell", 0x10, 250.0f, shell_sensor_offs);
20 MR::initCollisionParts(
this,
"KillerGunnerSingle",
getSensor(
"body"),
nullptr);
21 initEffectKeeper(0,
nullptr,
false);
23 MR::setClippingTypeSphereContainsModelBoundingBox(
this, 100.0f);
24 initNerve(&NrvKillerGunnerSingle::HostTypeWait::sInstance);
29 if (isNerve(&NrvKillerGunnerSingle::HostTypeShoot::sInstance)) {
30 if (MR::isSensorPlayer(a2)) {
31 if (MR::isNear(a1, a2, a1->mRadius)) {
32 if (MR::sendMsgEnemyAttackMaximum(a2, a1)) {
33 setNerve(&NrvKillerGunnerSingle::HostTypeAttack::sInstance);
40void KillerGunnerSingle::exeWait() {
41 if (MR::isFirstStep(
this)) {
45 if (MR::isStep(
this, 120)) {
46 setNerve(&NrvKillerGunnerSingle::HostTypeCharge::sInstance);
50void KillerGunnerSingle::exeCharge() {
51 if (MR::isFirstStep(
this)) {
52 MR::startBtk(
this,
"KillerGunnerSingleCharge");
55 MR::startLevelSound(
this,
"SE_OJ_LV_K_GUNNER_CHARGE", -1, -1, -1);
57 if (MR::isBtkStopped(
this)) {
58 MR::startBck(
this,
"KillerGunnerSingleShoot",
nullptr);
59 MR::emitEffect(
this,
"KillerGunnerSingleSmoke");
60 MR::startSound(
this,
"SE_OJ_K_GUNNER_FIRE", -1, -1);
61 setNerve(&NrvKillerGunnerSingle::HostTypeShoot::sInstance);
65void KillerGunnerSingle::exeShoot() {
66 if (MR::isFirstStep(
this)) {
67 MR::startRumbleWithShakeCameraWeak(
this,
"中",
"弱", 500.0f, 1000.0f);
70 if (MR::isStep(
this, 0)) {
74 if (MR::isStep(
this, 40)) {
78 if (MR::isBckStopped(
this)) {
79 setNerve(&NrvKillerGunnerSingle::HostTypeWait::sInstance);
83inline void KillerGunnerSingle::exeAttack() {
84 if (MR::isBckStopped(
this)) {
85 setNerve(&NrvKillerGunnerSingle::HostTypeWait::sInstance);
89KillerGunnerSingle::~KillerGunnerSingle() {
93namespace NrvKillerGunnerSingle {
94 INIT_NERVE(HostTypeAttack);
95 INIT_NERVE(HostTypeShoot);
96 INIT_NERVE(HostTypeCharge);
97 INIT_NERVE(HostTypeWait);
virtual void init(const JMapInfoIter &)
Intializes the NameObj and can set various settings and construct necessary classes.
The basis of a drawable actor that can contain states (see: Nerve)
HitSensor * getSensor(const char *pSensorName) const
Gets a sensor.