Vixen
02b45cc4
csharp
public sealed class InputService

The devices, the assets reading them, and the one call that advances both.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

What goes in the ServiceRegistry under InputService, and what the frame loop calls twice: BeginFrame before the platform's events are submitted, Update after. Splitting it in two is what makes the deltas right — the clear has to happen before the frame's motion arrives, not after.

It holds a list of assets rather than one, because local multiplayer is several InputActions over the same file with different GamepadSlots, and a rebinding screen is a fourth one nobody wants to remember to update by hand.

Fields and properties (3)

Methods (8)

  • public InputService()

    Creates the service with a device set of its own.

  • public InputService(InputDeviceSet devices)

    Creates the service over an existing device set.

  • public InputActions Add(InputActions actions)

    Adds an asset to update each frame.

  • public bool Remove(InputActions actions)

    Stops updating an asset.

  • public void BeginFrame()

    Clears the frame's motion deltas. Call before submitting the frame's events.

  • public void Update(GameTime time)

    Reads every asset. Call after submitting the frame's events.

  • public void Update(double time)

    Reads every asset.

  • public void ResetHeldState()

    Releases everything held and forgets every half-finished interaction.

Used by (6)

  • PlayerRigThirdPersonShooter
  • AppBuilderVixen.App.Hosting
  • AppServicesVixen.App.Hosting
  • InputRebindingTestsVixen.Input.Tests
  • InputUpdateSystemVixen.Engine
  • VixenApplicationVixen.App.Hosting