A class that calls the delegate function whenever the trigger is in a certain state.



  • 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.


  • Update(GamePadState padState)
    • check what state the Trigger is in through padState, then call the delegate that corresponds to the state
  • TriggerStateListener(bool useRightTrigger, float triggerThreshold, ButtonEvent upFunc, ButtonEvent downFunc):base(Buttons.A, upFunc, downFunc)
    • Constructor that accepts a trigger bool, a threshold to when the event should start checking, what happens when the trigger is up and what happens when the trigger is pressed. Buttons.A is passed to constructor for arbitrary value and then never used again.
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License