3#include "game/field/StateManager.hh"
4#include "game/field/obj/ObjectCollidable.hh"
17 void calc()
override {
22 [[nodiscard]] u32 loadFlags()
const override {
27 [[nodiscard]]
virtual const char *getKclName()
const override {
31 Kart::Reaction onCollision(
Kart::KartObject *kartObj, Kart::Reaction reactionOnKart,
32 Kart::Reaction reactionOnObj,
EGG::Vector3f &hitDepth)
override;
34 void setActive(
bool isSet) {
38 [[nodiscard]]
bool active()
const {
60 static constexpr std::array<StateManagerEntry, 2> STATE_ENTRIES = {{
62 &ObjectBasabasaDummy::calcState0>(0)},
80 [[nodiscard]] u32 loadFlags()
const override {
85 void createCollision()
override {}
88 void loadRail()
override {}
91 std::span<ObjectBasabasaDummy *>
m_bats;
Represents a single bat. It's owned and managed by ObjectBasabasa.
void calcState1()
This is run when a bat is hit with a start or other item. We can ignore for Kinoko.
const bool m_bigBump
Affects the severity of the "push" when colliding with bat.
void enterState1()
This is run when a bat is hit with a start or other item. We can ignore for Kinoko.
EGG::Vector3f m_initialPos
RNG-based starting position for the bat.
bool m_active
Whether or not this bat is currently spawned.
Can be thought of as the bat "spawner". It's the class that manages an array of bats.
u32 m_cycleTimer
Used to determine when to spawn next bat.
const u32 m_initialTimer
The m_cycleTimer starts and resets to this value.
const u32 m_batSpacing
How many frames in between bat spawns.
std::span< ObjectBasabasaDummy * > m_bats
The array of individual bats.
const u32 m_startFrame
Initial delay before the spawner will start calculating.
const u32 m_batsPerGroup
Number of bats that will spawn before resetting the m_cycleTimer.
u32 m_batsActive
The number of bats currently spawned.
Base class that represents different "states" for an object.
The highest level abstraction for a kart.