osb/source/game/items/StarThrownItem.hpp

30 lines
661 B
C++
Raw Permalink Normal View History

#pragma once
2023-06-20 04:33:09 +00:00
#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;
};
}