Entity deletion

This commit is contained in:
2024-10-21 23:32:02 +02:00
parent 84bb7b1eaa
commit c2504ec624
6 changed files with 116 additions and 80 deletions

View File

@@ -338,11 +338,19 @@ DONE
DELETE_ENTITY :: #string DONE
delete_entity :: (e: *Entity) {
// Delete the file too
path := tprint("../assets/scenes/%%/%%.ent", e.scene.name, e.id);
File.file_delete(path);
destroy_entity(e);
if e.type == {
%1
}
}
//#import "File";
DONE
SERIALIZE_ENTITY :: #string DONE