file: SerializableType.aus

class: SerializableType

[24:7] extends: FxObj

Wraps an AussomSerializableType (implementation of FXGL's SerializableType interface) so Aussom code can supply persistence behaviour to APIs that take a SerializableType. The two on* methods register callbacks for write and read; each receives a Bundle wrapper. Example: st = new SerializableType(); st.onWrite(::saveMyState); st.onRead(::loadMyState); public saveMyState(bundle) { bundle.put("hp", 42); } public loadMyState(bundle) { hp = bundle.get("hp"); }

Methods