A reimplementation of Mario Kart Wii's physics engine in C++
Loading...
Searching...
No Matches
KartObjectManager.hh
1#pragma once
2
3#include "game/kart/KartObject.hh"
4
5namespace Kart {
6
11public:
12 void init();
13 void calc();
14
17 [[nodiscard]] KartObject *object(size_t i) const {
18 ASSERT(i < m_count);
19 return m_objects[i];
20 }
22
23 static KartObjectManager *CreateInstance();
24 static void DestroyInstance();
25
26 [[nodiscard]] static KartObjectManager *Instance() {
27 return s_instance;
28 }
29
30private:
32 ~KartObjectManager() override;
33
34 size_t m_count;
35 KartObject **m_objects;
36
37 static KartObjectManager *s_instance;
38};
39
40} // namespace Kart
An interface for ensuring certain structures and classes are destroyed with the heap.
Definition Disposer.hh:11
Responsible for the lifecycle and calculation of KartObjects.
The highest level abstraction for a kart.
Definition KartObject.hh:11
Pertains to kart-related functionality.