v1.4.4
This commit is contained in:
commit
9c94d113d3
10260 changed files with 1237388 additions and 0 deletions
38
source/game/items/StarConsumableItem.hpp
Normal file
38
source/game/items/StarConsumableItem.hpp
Normal file
|
@ -0,0 +1,38 @@
|
|||
#ifndef STAR_CONSUMABLE_ITEM_HPP
|
||||
#define STAR_CONSUMABLE_ITEM_HPP
|
||||
|
||||
#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(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;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue