Exemple #1
0
        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);
        }
Exemple #3
0
        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;
            }
        }
Exemple #4
0
 public I SampleInput()
 {
     buffer[index] = baseInputSource.SampleInput();
     index         = (index + 1) % buffer.Length;
     return(buffer[index]);
 }