mapcreator git · master
SDL3 2.5D game and engine using assets, with map editor
C++ 99.3%git clone https://git.christianimmanuel.de/sdl-graphics/mapcreator.gitwget https://git.christianimmanuel.de/sdl-graphics/mapcreator/archive/mapcreator.tar.gzsrc/resource/resource.hpp raw
#pragma once
#include "objects/object.hpp"
#include "resource/resource_data.hpp"
enum class ItemType : uint32_t ;
class Resource : public Object {
public:
Resource(// OBJECT STUFF
ObjectType ot,
ObjectCategory oc,
TileType tt,
size_t ts_id,
size_t tso_id,
SDL_Point wtp,
SDL_Point d,
int zi,
// RESOURCES
ResourceType rt,
unsigned qty,
CollectingMethode m,
float duration)
: Object(ot, oc, tt, ts_id, tso_id, wtp, d, zi),
resource(rt),
quantity(qty),
collecting_methode(m),
collecting_duration(duration)
{}
ResourceType resource;
unsigned quantity;
CollectingMethode collecting_methode;
float collecting_duration;
bool is_Collectable(ItemType item);
};