CoreDefinitions class abstract final

Definitions for the core components whose save format predates definitions, one per built-in component.

Field names are the legacy JSON keys, so migrating an old file was a matter of hoisting each component's keys under fields (and reshaping the two vector-valued ones) — what V0ToV1 does. These drive the inspector, sizing and drawing, and are the save format.

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Properties

all → List<ComponentDefinition<Component>>
Every definition above.
no setter
capsule → ComponentDefinition<CapsuleComponent>
Definition of CapsuleComponent, saved as CapsuleComponent; a new one is 32 wide, 64 high. 2-D only.
no setter
children → ComponentDefinition<ChildrenComponent>
Definition of ChildrenComponent, saved as ChildrenComponent. Its childIds are saved for reference only and never read back.
no setter
circle → ComponentDefinition<CircleComponent>
Definition of CircleComponent, saved as CircleComponent; a new one has radius 32. 2-D only.
no setter
effect → ComponentDefinition<EffectComponent>
Definition of EffectComponent, saved as EffectComponent with no fields: its effect queue is not saved, so a loaded one starts empty.
no setter
health → ComponentDefinition<HealthComponent>
Definition of HealthComponent, saved as HealthComponent; a new one has 100 max health.
no setter
input → ComponentDefinition<InputComponent>
Definition of InputComponent, saved as InputComponent: its playerIndex (-1 reads every device).
no setter
lifetime → ComponentDefinition<LifetimeComponent>
Definition of LifetimeComponent, saved as LifetimeComponent; a new one lasts 3 seconds.
no setter
parent → ComponentDefinition<ParentComponent>
Definition of ParentComponent, saved as ParentComponent. Its parentId is saved for reference only; no local transform is saved.
no setter
rectangle → ComponentDefinition<RectangleComponent>
Definition of RectangleComponent, saved as RectangleComponent; a new one is 64 × 64. 2-D only.
no setter
simpleMovement → ComponentDefinition<SimpleMovementComponent>
Definition of SimpleMovementComponent, saved as SimpleMovementComponent. 2-D only.
no setter
spawn → ComponentDefinition<SpawnComponent>
Definition of SpawnComponent (a spawn point), saved as SpawnComponent.
no setter
sprite → ComponentDefinition<SpriteComponent>
Definition of SpriteComponent, saved as SpriteComponent. 2-D only.
no setter
tag → ComponentDefinition<TagComponent>
Definition of TagComponent, saved as TagComponent with its tags as a tags list.
no setter
transform → ComponentDefinition<TransformComponent>
Definition of TransformComponent, saved as TransformComponent: position, rotation (Euler angles in radians) and scale. It cannot be removed in the inspector.
no setter
velocity → ComponentDefinition<VelocityComponent>
Definition of VelocityComponent, saved as VelocityComponent.
no setter