Vixen
02b45cc4
csharp
public enum MoveButtons

The buttons a player can be holding, as one field.

Read the guide page for this →

Remarks

A bitfield rather than a bool each, because MoveIntent goes on a wire every tick and several ticks at a time ([16](../../../docs/plan/16-networking.md) § Prediction) — eight booleans is eight bytes where eight bits will do.

The high byte is the game's. The engine names the eight verbs every game with a character has; a game needing a ninth writes (MoveButtons)(1 << 8) and gives it a name of its own. Widening this enum later would be a wire break and a scene break at once, so the room is reserved now rather than found later.

Fields and properties (10)

  • None

    Nothing held.

  • Jump

    Jump.

  • Crouch

    Crouch.

  • Sprint

    Sprint.

  • Primary

    The primary action — fire, swing, use.

  • Secondary

    The secondary action.

  • Aim

    Aim down sights, or whatever focusing means.

  • Interact

    Interact with whatever is in front.

  • Reload

    Reload.

  • EngineMask

    Every bit the engine has named. Everything above it belongs to the game.

Used by (17)

  • WeaponFireThirdPersonShooter
  • ActionPlayerInputVixen.Engine
  • CharacterAllocationTestsVixen.Physics.Tests
  • CharacterMotionVixen.Physics
  • CharacterMotionTestsVixen.Physics.Tests
  • CharacterSceneTestsVixen.Physics.Tests
  • ConstantVixen.Engine.Tests
  • MoveIntentVixen.Engine
  • PlayerAllocationTestsVixen.Engine.Tests
  • PlayerInputTestsVixen.Engine.Tests
  • PlayerMoveInputVixen.Net.Engine
  • PlayerMoveInputTestsVixen.Net.Engine.Tests
  • PossessionTestsVixen.Engine.Tests
  • PredictedPlayerMovementTestsVixen.Net.Physics.Tests
  • ScriptedVixen.Engine.Tests
  • TypeRegistrationVixen.Engine
  • Vixen_Engine_Players_MoveIntentSerializerVixen.Engine