Class WalkControlTriggers

java.lang.Object
com.ardorcraft.control.WalkControlTriggers
All Implemented Interfaces:
ITriggerGroup

public class WalkControlTriggers extends Object implements ITriggerGroup
Set of triggers to use for walking.
  • Constructor Details

    • WalkControlTriggers

      public WalkControlTriggers(PlayerBase playerParam, ReadOnlyVector3 upAxisParam, boolean mouseLookDragOnly, UprightFPSMoveConfig moveConfigParam)
      Constructor for the WalkControlTriggers
      Parameters:
      playerParam - The player for the triggers to update
      upAxisParam - The up axis of the player
      mouseLookDragOnly - True if mouse look requires draging
      moveConfigParam - The keys for for moving and turning.
  • Method Details

    • move

      protected void move(TwoInputStates state, double tpf)
      Move in response to the controls
      Parameters:
      state - The input state
      tpf - The time per frame.
    • turn

      protected void turn(TwoInputStates state, double tpf)
      Turn the player in response to the input state.
      Parameters:
      state - The input state
      tpf - The time per frame.
    • rotate

      protected void rotate(double dx, double dy)
      Rotate the player by the desired amounts
      Parameters:
      dx - The x angle to rotate
      dy - The y angle to rotate
    • AddToLayer

      public void AddToLayer(LogicalLayer layer)
      Description copied from interface: ITriggerGroup
      Add the triggers to the specified logical layer.
      Specified by:
      AddToLayer in interface ITriggerGroup
      Parameters:
      layer - The logical layer to add the triggers to.
    • RemoveFromLayer

      public void RemoveFromLayer(LogicalLayer layer)
      Description copied from interface: ITriggerGroup
      Removes the trigger from the specified logival layer
      Specified by:
      RemoveFromLayer in interface ITriggerGroup
      Parameters:
      layer - The logical layer to remove the triggers from.