rm KeyboardInput

GitOrigin-RevId: 1725d577c5be04488a6723b65c0c93fa25d12ab5
This commit is contained in:
Colin McMillen 2020-01-10 16:58:35 -05:00
parent 660d163119
commit 361a02c67f
3 changed files with 2 additions and 28 deletions

View File

@ -1,24 +0,0 @@
using Microsoft.Xna.Framework.Input;
using System.Collections.Generic;
namespace SemiColinGames {
public class KeyboardInput {
private KeyboardState oldState = Keyboard.GetState();
private List<Keys> newKeysDown = new List<Keys>();
public void Update() {
KeyboardState newState = Keyboard.GetState();
newKeysDown.Clear();
foreach (Keys k in newState.GetPressedKeys()) {
if (!oldState.IsKeyDown(k)) {
newKeysDown.Add(k);
}
}
oldState = newState;
}
public List<Keys> NewKeysDown() {
return newKeysDown;
}
}
}

View File

@ -14,7 +14,6 @@
<Compile Include="$(MSBuildThisFileDirectory)FpsCounter.cs" /> <Compile Include="$(MSBuildThisFileDirectory)FpsCounter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)History.cs" /> <Compile Include="$(MSBuildThisFileDirectory)History.cs" />
<Compile Include="$(MSBuildThisFileDirectory)IDisplay.cs" /> <Compile Include="$(MSBuildThisFileDirectory)IDisplay.cs" />
<Compile Include="$(MSBuildThisFileDirectory)KeyboardInput.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Player.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Player.cs" />
<Compile Include="$(MSBuildThisFileDirectory)SneakGame.cs" /> <Compile Include="$(MSBuildThisFileDirectory)SneakGame.cs" />
<Compile Include="$(MSBuildThisFileDirectory)World.cs" /> <Compile Include="$(MSBuildThisFileDirectory)World.cs" />

View File

@ -15,7 +15,6 @@
<Compile Include="History.cs" /> <Compile Include="History.cs" />
<Compile Include="IDisplay.cs" /> <Compile Include="IDisplay.cs" />
<Compile Include="SneakGame.cs" /> <Compile Include="SneakGame.cs" />
<Compile Include="KeyboardInput.cs" />
<Compile Include="Player.cs" /> <Compile Include="Player.cs" />
<Compile Include="World.cs" /> <Compile Include="World.cs" />
</ItemGroup> </ItemGroup>