blob: 0b4974c2c2e1436a1c254b854311b616566da11b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
#pragma once
#include "StarItem.hpp"
#include "StarGameTypes.hpp"
#include "StarSwingableItem.hpp"
namespace Star {
class ConsumableItem : public Item, public SwingableItem {
public:
ConsumableItem(Json const& config, String const& directory, Json const& data);
ItemPtr clone() const override;
List<Drawable> drawables() const override;
void update(float dt, FireMode fireMode, bool shifting, HashSet<MoveControlType> const& moves) override;
void fire(FireMode mode, bool shifting, bool edgeTriggered) override;
void fireTriggered() override;
void uninit() override;
private:
bool canUse() const;
void triggerEffects();
void maybeConsume();
StringSet m_blockingEffects;
Maybe<float> m_foodValue;
StringSet m_emitters;
String m_emote;
bool m_consuming;
};
}
|