WorldMemory
此内容尚不支持你的语言。
Defined in: sdk/src/residency/worldMemory.ts:62
What a streamed world remembers of its cells.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new WorldMemory(
app_,manifest_):WorldMemory
Defined in: sdk/src/residency/worldMemory.ts:68
Parameters
Section titled “Parameters”manifest_
Section titled “manifest_”() => WorldManifest | null
Returns
Section titled “Returns”WorldMemory
Accessors
Section titled “Accessors”Get Signature
Section titled “Get Signature”get size():
number
Defined in: sdk/src/residency/worldMemory.ts:71
How many entities are remembered, gone ones included.
Returns
Section titled “Returns”number
Methods
Section titled “Methods”adapt()
Section titled “adapt()”adapt(
sceneName,data):SceneData
Defined in: sdk/src/residency/worldMemory.ts:99
A cell’s document, as it should be brought in: what was destroyed taken out, with everything under it, and what was remembered set back to how it was left. Any other scene is handed back as it is.
Parameters
Section titled “Parameters”sceneName
Section titled “sceneName”string
Returns
Section titled “Returns”clear()
Section titled “clear()”clear():
void
Defined in: sdk/src/residency/worldMemory.ts:79
Forget everything: a new game.
Returns
Section titled “Returns”void
despawned()
Section titled “despawned()”despawned(
entity):void
Defined in: sdk/src/residency/worldMemory.ts:135
Told of every entity the world destroys: a remembered one is written down as left, or as gone.
Parameters
Section titled “Parameters”entity
Section titled “entity”number
Returns
Section titled “Returns”void
isGone()
Section titled “isGone()”isGone(
cell,id):boolean
Defined in: sdk/src/residency/worldMemory.ts:74
Whether the entity authored as id in cell was destroyed and stays so.
Parameters
Section titled “Parameters”string
number
Returns
Section titled “Returns”boolean
read()
Section titled “read()”read(
data):void
Defined in: sdk/src/residency/worldMemory.ts:89
Take a save’s memory in place of this one. Cells already in keep what they are; the next one brought in reads it.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
toJSON()
Section titled “toJSON()”toJSON():
WorldMemoryData
Defined in: sdk/src/residency/worldMemory.ts:84
The memory as a save holds it.