A reimplementation of Mario Kart Wii's physics engine in C++
Loading...
Searching...
No Matches
KartItem.hh
1#pragma once
2
3#include "game/item/ItemInventory.hh"
4
5#include "game/kart/KartObjectProxy.hh"
6
7#include <egg/core/BitFlag.hh>
8
9namespace Kinoko::Item {
10
14public:
15 KartItem();
16 ~KartItem();
17
18 void init(size_t playerIdx);
19 void calc();
20 void clear();
21
22 void activateMushroom();
23 void useMushroom();
24
26 [[nodiscard]] ItemInventory &inventory() {
27 return m_inventory;
28 }
29
30 [[nodiscard]] const ItemInventory &inventory() const {
31 return m_inventory;
32 }
34
35private:
36 enum class eFlags {
37 Lockout = 10,
38 ItemButtonHold = 12,
39 ItemButtonActivation = 14,
40 };
42
43 Flags m_flags;
44 ItemInventory m_inventory;
45};
46
47} // namespace Kinoko::Item
State management for item usage.
Definition KartItem.hh:13
void calc()
Calculates item activation based on the controller input state.
Definition KartItem.cc:25
Base class for most kart-related objects.
Pertains to item handling.
Wrapper around an integral type with an enum corresponding to its bits.
Definition BitFlag.hh:23