Kinoko
A reimplementation of Mario Kart Wii's physics engine in C++
Toggle main menu visibility
Loading...
Searching...
No Matches
ItemInventory.cc
1
#include "ItemInventory.hh"
2
3
namespace
Kinoko::Item
{
4
5
ItemInventory::ItemInventory() =
default
;
6
7
ItemInventory::~ItemInventory() =
default
;
8
10
void
ItemInventory::setItem(ItemId
id
) {
11
constexpr
int
MUSHROOM_COUNT = 3;
12
13
m_currentId = id;
14
m_currentCount = MUSHROOM_COUNT;
15
}
16
18
void
ItemInventory::useItem(
int
count) {
19
m_currentCount -= count;
20
if
(m_currentCount > 0) {
21
return
;
22
}
23
24
clear();
25
}
26
28
void
ItemInventory::clear() {
29
m_currentId = ItemId::NONE;
30
m_currentCount = 0;
31
}
32
33
}
// namespace Kinoko::Item
Kinoko::Item
Pertains to item handling.
Definition
ItemDirector.cc:5
game
item
ItemInventory.cc
Made by
Malleo
. Logo by
vabold
. Website generated by
Doxygen
1.17.0