8void ItemDirector::init() {
9 for (
auto &kart : m_karts) {
10 kart.inventory().setItem(ItemId::TRIPLE_MUSHROOM);
15void ItemDirector::calc() {
16 for (
auto &kart : m_karts) {
29void ItemDirector::DestroyInstance() {
31 auto *instance = s_instance;
37ItemDirector::ItemDirector() {
38 size_t playerCount = System::RaceConfig::Instance()->raceScenario().playerCount;
39 m_karts = std::span<KartItem>(
new KartItem[playerCount], playerCount);
41 for (
size_t i = 0; i < playerCount; ++i) {
47ItemDirector::~ItemDirector() {
50 WARN(
"ItemDirector instance not explicitly handled!");
53 delete[] m_karts.data();