Browse Source

rm KeyboardInput

GitOrigin-RevId: 1725d577c5
master
Colin McMillen 4 years ago
parent
commit
361a02c67f
  1. 24
      Shared/KeyboardInput.cs
  2. 3
      Shared/Shared.projitems
  3. 3
      Shared/Shared.shproj

24
Shared/KeyboardInput.cs

@ -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;
}
}
}

3
Shared/Shared.projitems

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

3
Shared/Shared.shproj

@ -15,7 +15,6 @@
<Compile Include="History.cs" />
<Compile Include="IDisplay.cs" />
<Compile Include="SneakGame.cs" />
<Compile Include="KeyboardInput.cs" />
<Compile Include="Player.cs" />
<Compile Include="World.cs" />
</ItemGroup>
@ -24,4 +23,4 @@
</ItemGroup>
<Import Project="Shared.projitems" Label="Shared" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.CSharp.targets" />
</Project>
</Project>
Loading…
Cancel
Save