TriggerPressureListener

Description

A class that checks to see if the Trigger has gone a certain threshold, then calls a the delegates function and passes the current trigger's degree to the method.

Relationships

Members

  • bool isRightTrigger - whether we should check the right or left trigger
  • bool isTriggerDown - whether the trigger is pass the threshold or not
  • float threshold - when then value surpasses the threshold, the state is then down.

Methods

  • Update(GamePadState padState)
    • check what state the Trigger is in through padState, then call the delegate that corresponds to the state
  • TriggerPressListener(bool useRightTrigger, float triggerThreshold, TriggerEvent upFunc, TriggerEvent downFunc):base(bool useRightTrigger, float triggerThreshold, upFunc, downFunc)
    • Constructor that accepts a trigger bool, a threshold when the trigger event should fire, what happens when the trigger is up and what happens when the trigger is pressed down
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License