- All Known Implementing Classes:
JsonWorldIo
@NullMarked
public interface WorldIo
Defines the API contract for serializing and deserializing a
World
.-
Method Details
-
stringify
Serializes aWorld
into a string.- Parameters:
world
- theWorld
to serialize- Returns:
- the serialized
World
-
parse
Deserializes a string into aWorld
.- Parameters:
worldString
- the string to deserialize- Returns:
- the deserialized
World
-
processWorldAfterDeserialize
Loops through eachEntity
in aWorld
and callsComponent.afterDeserialize(World)
for eachComponent
of theEntity
.- Parameters:
world
- theWorld
to process
-