export class ScriptContext {
    phase;
    deltaSeconds;
    fixedDeltaSeconds;
    target;
    services;
    constructor(options) {
        this.phase = options.phase;
        this.deltaSeconds = options.deltaSeconds ?? 0;
        this.fixedDeltaSeconds = options.fixedDeltaSeconds ?? 0;
        this.target = options.target;
        this.services = options.services ?? new Map();
    }
    getService(name) {
        if (!this.services.has(name)) {
            throw new Error(`Script service is not available in ${this.phase}: ${name}`);
        }
        return this.services.get(name);
    }
}
//# sourceMappingURL=ScriptContext.js.map