define
SourceDefines one pre-bind feature.
Core
Pre-bind features: reusable slices that contribute a schema fragment and the schedules that operate on it.
A feature builds its schedules only after the final merged schema is bound, and its builder can only reach descriptors from its own fragment and from the features it requires.
const Combat = Schema.Feature.define("Combat", {
schema: CombatSchema,
requires: [Core],
build: (Game) => ({ update: [Game.Schedule(Attack, Game.Schedule.applyDeferred())] })
})
const project = Schema.Feature.compose({ root: Root, features: [Core, Combat] })
const runtime = project.Game.Runtime.make({ services: project.Game.Runtime.services() })
runtime.tick(...project.schedules.update)
No description provided yet.