UNPKG

multyx

Version:

Framework designed to simplify the creation of multiplayer browser games by addressing the complexities of managing server-client communication, shared state, and input handling

19 lines (18 loc) 557 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const native_1 = require("../utils/native"); class MultyxUndefined { constructor(agent, propertyPath) { this.agent = agent; this.propertyPath = propertyPath; this.relayChanges(); } /** * Send an EditUpdate to all public agents */ relayChanges() { var _a; (_a = this.agent.server) === null || _a === void 0 ? void 0 : _a[native_1.Edit](this, new Set(this.agent.clients)); } } exports.default = MultyxUndefined;