mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 08:09:19 +02:00
New Components/ Prepare to new scene loading system
This commit is contained in:
12
entitysystem/ECSPersistence.h
Normal file
12
entitysystem/ECSPersistence.h
Normal file
@@ -0,0 +1,12 @@
|
||||
#pragma once
|
||||
#include <string>
|
||||
|
||||
class ECWorld;
|
||||
|
||||
namespace ecs_persistence
|
||||
{
|
||||
// Save all named entities to a JSON file. Returns number of entities saved, or -1 on error.
|
||||
int save(ECWorld &world, const std::string &path);
|
||||
// Load entities from a JSON file. Skips entities whose name already exists. Returns count loaded, or -1 on error.
|
||||
int load(ECWorld &world, const std::string &path);
|
||||
}
|
||||
Reference in New Issue
Block a user