public PlayerInput SampleInput() { var input = _baseInputSource.SampleInput(); // TODO(james7132) TapDetector.Update(input.Movement); input.Smash = TapDetector.SmashValue; //controllerMapping.Smash(device); return(input); }
public PlayerInput SampleInput() { var input = _baseInputSource.SampleInput(); if (_config.LocalPlayerID == 0) { input = input.MergeWith(KeyboardInput()); } return(input); }
public BufferedInputSource(int bufferSize, IInputSource <I> baseInputSource) { this.baseInputSource = baseInputSource; buffer = new I[bufferSize]; I sampledBaseInput = baseInputSource.SampleInput(); for (int i = 0; i < buffer.Length; i++) { buffer[i] = sampledBaseInput; } }
public I SampleInput() { buffer[index] = baseInputSource.SampleInput(); index = (index + 1) % buffer.Length; return(buffer[index]); }