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 Kinoko::Field {
6
9class ObjectPakkunF final : public ObjectCollidable {
10public:
11 ObjectPakkunF(const System::MapdataGeoObj &params);
12 ~ObjectPakkunF() override;
13
14 void init() override;
15 void calc() override;
16
18 [[nodiscard]] LoadFlags loadFlags() const override {
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 Kinoko::Field
EGG::TBitFlag< u8, eLoadFlags > LoadFlags
A bitfield of eLoadFlags that represents the update requirements of the object.
Definition ObjectBase.hh:36
@ Calc
The state of the object should be recalculated every frame.
Definition ObjectBase.hh:30
LoadFlags loadFlags() const override
Returns a bitmask indicating which lifecycle hooks should be called for the object.
s32 m_waitFrames
How long until the piranha starts chomping.
f32 getCollisionRadius() const override
Finds the radius that fits fully in a BoxColUnit.
const u32 m_waitDuration
How long the piranhas has been attacking for.
s32 m_attackFrames
How long until the piranha stops chomping.
Pertains to collision.