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

            return(new TimedAnalogButtonState(value, State.NextState(down), down ? TimePressed + elapsed : TimeSpan.Zero));
        }