Component
component declares an ECS component: a plain-old-data (POD) storage unit with fields and no behavior, read and written by a query that filters entities by type.
Component data lives in the host’s native storage. No “component value” exists on the script side; a component shows up only in a query’s variable view.
Declaration Form
Declared at module top level, with two visibility tiers, public / internal:
module EcsDemo;
public component Position
{
public var X: float;
public var Y: float;
}
public component Velocity
{
public var X: float = 0.0;
}
public component Enemy;编写到此Written up to here
本页其余部分尚未完成,内容随时补充。The rest of this page is not written yet; more content will follow.
Last updated on October 11, 2026
