예제 #1
0
    internal TimedAnalogButtonState NextState(float value, float elapsed)
    {
        var down = value > TriggerThreshold;

        return(new TimedAnalogButtonState(value, State.NextState(down), down ? TimePressed + elapsed : 0));
    }
예제 #2
0
 internal TimedButtonState NextState(bool down, float elapsed)
 {
     return(new TimedButtonState(State.NextState(down), down ? TimePressed + elapsed : 0));
 }