A reimplementation of Mario Kart Wii's physics engine in C++
Loading...
Searching...
No Matches
ItemDirector.hh
1#pragma once
2
3#include "game/item/KartItem.hh"
4
5#include <span>
6
8namespace Item {
9
12public:
13 void init();
14 void calc();
15
16 [[nodiscard]] KartItem &kartItem(size_t idx) {
17 ASSERT(idx < m_karts.size());
18 return m_karts[idx];
19 }
20
21 static ItemDirector *CreateInstance();
22 static void DestroyInstance();
23
24 [[nodiscard]] static ItemDirector *Instance() {
25 return s_instance;
26 }
27
28private:
30 ~ItemDirector() override;
31
32 std::span<KartItem> m_karts;
33
34 static ItemDirector *s_instance;
35};
36
37} // namespace Item
An interface for ensuring certain structures and classes are destroyed with the heap.
Definition Disposer.hh:11
State management for item usage.
Definition KartItem.hh:13
Pertains to item handling.