Expand description
Interface with Screeps’ Memory
global variable
If you wish to access the Memory
object stored in the javascript heap
which has its encoding, storage, and decoding from JSON handled by the game,
this allows accessing a reference to the ROOT
of Memory object. Game
objects which have an automatic memory accessor can access references to
their respective parts of the object, eg.
Creep::memory
/StructureSpawn::memory
. You can work with these
objects using js_sys::Reflect
, or by converting the value into a
wasm_bindgen compatible type with the properly access functions you need via
wasm_bindgen::JsCast
.
Statics§
- ROOT
Deprecated