3#include "game/field/obj/ObjectCollidable.hh"
18 [[nodiscard]] u32 loadFlags()
const override {
22 void calcCollisionTransform()
override;
23 Kart::Reaction onCollision(
Kart::KartObject *kartObj, Kart::Reaction reactionOnKart,
24 Kart::Reaction reactionOnObj,
EGG::Vector3f &hitDepth)
override;
30 virtual void startStill() {
31 m_anmState = AnmState::Still;
34 m_flags.
setBit(eFlags::Rotation);
39 void startGrounded() {
54 enum class StompState {
59 StompState m_stompState;
70 bool m_touchingGround;
76 void calcBeforeFall();
88 m_pos.y = std::min(RISING_VEL + m_pos.y, m_initialPosY);
89 m_flags.
setBit(eFlags::Position);
92 void checkFloorCollision();
94 static constexpr u32 GROUND_DURATION = 60;
95 static constexpr u32 STOMP_ACCEL = 17.0f;
96 static constexpr f32 STOMP_RADIUS = 20.0f;
98 static constexpr f32 RISING_VEL = 10.0f;
Base class for the various different Thwomp types in the game.
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.
static constexpr u32 BEFORE_FALL_DURATION
The total number of frames the thwomp rises before crashing down.
s32 m_shakePhase
Causes the Thwomp's position to shake at the end of the "still" state.
s32 m_beforeFallTimer
Number of frames until the Thwomp will stomp down.
s32 m_stillTimer
Number of frames the Thwomp will remain stationary (or shakes)
f32 m_vel
Vector3f in the base game, but only the y-component is used.
u32 m_fullDuration
Framecount of an entire animation loop.
s32 m_groundedTimer
Number of frames the Thwomp remains on the ground.
The highest level abstraction for a kart.
constexpr TBitFlag< T, E > & setBit(Es... es)
Sets the corresponding bits for the provided enum values.