A reimplementation of Mario Kart Wii's physics engine in C++
Loading...
Searching...
No Matches
ObjectPakkunF.hh
1#pragma once
2
3#include "game/field/obj/ObjectCollidable.hh"
4
5namespace Field {
6
9class ObjectPakkunF final : public ObjectCollidable {
10public:
12 ~ObjectPakkunF() override;
13
14 void init() override;
15 void calc() override;
16
18 [[nodiscard]] u32 loadFlags() const override {
19 return 1;
20 }
21
22 void loadAnims() override;
23 void calcCollisionTransform() override;
24
26 [[nodiscard]] f32 getCollisionRadius() const override {
27 return 1000.0f;
28 }
29
30private:
31 enum class State {
32 Wait = 0,
33 Attack = 1,
34 };
35
36 void calcWait();
37 void calcAttack();
38 void enterAttack();
39
40 State m_state;
43 u32 m_currAttackFrame;
44
47 const u32 m_waitDuration;
48};
49
50} // namespace Field
Represents the piranhas on GCN Mario Circuit.
s32 m_attackFrames
How long until the piranha stops chomping.
f32 getCollisionRadius() const override
Finds the radius that fits fully in a BoxColUnit.
s32 m_waitFrames
How long until the piranha starts chomping.
const u32 m_waitDuration
How long the piranhas has been attacking for.
Pertains to collision.