3#include "game/field/obj/ObjectCollidable.hh"
6class ObjectDossunTsuibiHolder;
21 [[nodiscard]] u32 loadFlags()
const override {
25 void calcCollisionTransform()
override;
26 Kart::Reaction onCollision(
Kart::KartObject *kartObj, Kart::Reaction reactionOnKart,
27 Kart::Reaction reactionOnObj,
EGG::Vector3f &hitDepth)
override;
33 virtual void startStill() {
34 m_anmState = AnmState::Still;
37 m_flags.
setBit(eFlags::Rotation);
42 void startGrounded() {
57 enum class StompState {
62 StompState m_stompState;
73 bool m_touchingGround;
79 void calcBeforeFall();
91 m_pos.y = std::min(RISING_VEL + m_pos.y, m_initialPosY);
92 m_flags.
setBit(eFlags::Position);
95 void checkFloorCollision();
97 static constexpr u32 GROUND_DURATION = 60;
98 static constexpr u32 STOMP_ACCEL = 17.0f;
99 static constexpr f32 STOMP_RADIUS = 20.0f;
100 static constexpr EGG::Vector3f STOMP_POS_OFFSET = EGG::Vector3f(0.0f, STOMP_RADIUS, 0.0f);
101 static constexpr f32 RISING_VEL = 10.0f;
The manager class for the pair of Thwomps in the long hallway on rBC.
Base class for the various different Thwomp types in the game.
u32 m_fullDuration
Framecount of an entire animation loop.
AnmState
Represents the current movement state of the Thwomp in terms of its stomp.
@ BeforeFall
The quick upwards motion before slamming down.
@ Grounded
Contacting the floor.
s32 m_shakePhase
Causes the Thwomp's position to shake at the end of the "still" state.
s32 m_stillTimer
Number of frames the Thwomp will remain stationary (or shakes)
s32 m_groundedTimer
Number of frames the Thwomp remains on the ground.
f32 m_vel
Vector3f in the base game, but only the y-component is used.
s32 m_beforeFallTimer
Number of frames until the Thwomp will stomp down.
static constexpr u32 BEFORE_FALL_DURATION
The total number of frames the thwomp rises before crashing down.
The highest level abstraction for a kart.
constexpr TBitFlag< T, E > & setBit(Es... es)
Sets the corresponding bits for the provided enum values.