@woosh/meep-engine
Version:
Pure JavaScript game engine. Fully featured and production ready.
27 lines (22 loc) • 731 B
JavaScript
import { BinaryClassSerializationAdapter } from "../../../ecs/storage/binary/BinaryClassSerializationAdapter.js";
import { WaitForEventBehavior } from "./WaitForEventBehavior.js";
export class WaitForEventBehaviorSerializationAdapter extends BinaryClassSerializationAdapter {
klass = WaitForEventBehavior;
version = 0;
/**
*
* @param {BinaryBuffer} buffer
* @param {WaitForEventBehavior} value
*/
serialize(buffer, value) {
buffer.writeUTF8String(value.event);
}
/**
*
* @param {BinaryBuffer} buffer
* @param {WaitForEventBehavior} value
*/
deserialize(buffer, value) {
value.event = buffer.readUTF8String();
}
}