public bool UpdateWithState(bool state, ulong updateTick, float deltaTime) { PrepareForUpdate(updateTick); nextState.Set(state || nextState.State); return(state); }
public bool UpdateWithState(bool state, ulong updateTick, float deltaTime) { if (this == InputControl.Null) { return(false); } PrepareForUpdate(updateTick); nextState.Set(state || nextState.State); return(state); }
public void UpdateWithState(bool state, ulong updateTick) { if (IsNull) { throw new InvalidOperationException("A null control cannot be updated."); } if (UpdateTick > updateTick) { throw new InvalidOperationException("A control cannot be updated with an earlier tick."); } tempState.Set(state || tempState.State); }
public void UpdateWithState(bool state, float updateTime) { if (IsNull) { throw new InvalidOperationException("A null control cannot be updated."); } lastState = thisState; if (thisState != state) { UpdateTime = updateTime; thisState.Set(state); } }
public void UpdateWithValue(float value, ulong updateTick, float stateThreshold) { if (UpdateTick > updateTick) { throw new InvalidOperationException("A control cannot be updated with an earlier tick."); } lastState = thisState; thisState.Set(value, stateThreshold); if (thisState != lastState) { UpdateTick = updateTick; } }