added inventory & active object
This commit is contained in:
1 parent
e1b491be73
commit
b3fda88784
16 files changed
+793
-98
No files matched your search
@@ -5,6 +5,7 @@
|
||||
#include <unordered_map>
|
||||
#include "external/nlohmann/json.hpp"
|
||||
#include "TextModel.h"
|
||||
#include "InteractiveObject.h"
|
||||
|
||||
namespace ZL {
|
||||
|
||||
@@ -23,6 +24,12 @@ namespace ZL {
|
||||
float positionY = 0.0f;
|
||||
float positionZ = 0.0f;
|
||||
float scale = 1.0f;
|
||||
bool interactive = false;
|
||||
std::string itemId;
|
||||
std::string itemName;
|
||||
std::string itemDescription;
|
||||
std::string itemIcon;
|
||||
float interactionRadius = 2.0f;
|
||||
};
|
||||
|
||||
struct LoadedGameObject {
|
||||
@@ -40,6 +47,12 @@ namespace ZL {
|
||||
Renderer& renderer,
|
||||
const std::string& zipPath = ""
|
||||
);
|
||||
|
||||
static std::vector<InteractiveObject> loadAndCreateInteractiveObjects(
|
||||
const std::string& jsonPath,
|
||||
Renderer& renderer,
|
||||
const std::string& zipPath = ""
|
||||
);
|
||||
};
|
||||
|
||||
} // namespace ZL
|
||||
Reference in new issue
Block a user