Scripting Basics
Gameplay in HxEngine is written in C# as components attached to entities. This guide introduces the model; the full API reference and samples ship with the engine.
The component model
Section titled “The component model”HxEngine uses a UE-style component model (not a pure ECS). You derive from a component base class and override lifecycle methods that the engine calls for you:
OnAttach → OnBeginPlay → OnActivate → OnTick(dt) → OnDeactivate → OnEndPlay → OnDestroyA scene component additionally carries a transform (local position/rotation/scale and a parent/child hierarchy); a plain component does not.
What the full guide covers
Section titled “What the full guide covers”- Writing a component and reacting to the lifecycle.
- Reading input and moving an entity each tick.
- Querying physics (traces) and handling collision/trigger events.
- Playing animation, audio events and VFX from code.
- Referencing sibling components by name and resolving them at spawn time.
See it in practice
Section titled “See it in practice”SampleGame is the reference: its player controller, movement and grappling hook are all components built on these same pieces.