osb/source/game/items/StarThrownItem.hpp
2023-06-20 14:33:09 +10:00

33 lines
714 B
C++

#ifndef STAR_THROWN_ITEM_HPP
#define STAR_THROWN_ITEM_HPP
#include "StarItem.hpp"
#include "StarDrawable.hpp"
#include "StarSwingableItem.hpp"
#include "StarPreviewableItem.hpp"
namespace Star {
class ThrownItem : public Item, public SwingableItem, public PreviewableItem {
public:
ThrownItem(Json const& config, String const& directory, Json const& itemParameters = JsonObject());
ItemPtr clone() const override;
List<Drawable> drawables() const override;
List<Drawable> preview(PlayerPtr const& viewer = {}) const override;
protected:
void fireTriggered() override;
private:
String m_projectileType;
Json m_projectileConfig;
size_t m_ammoUsage;
List<Drawable> m_drawables;
};
}
#endif