keyboard controls
parent
a654a5f9a3
commit
72d960806a
|
@ -50,7 +50,26 @@ namespace KavTest.Engines
|
|||
if (SomeComponent<PerspectiveCameraComponent>())
|
||||
{
|
||||
var cameraEntity = ReadEntity<PerspectiveCameraComponent>();
|
||||
SendMessage(new RotateCameraMessage(cameraEntity, -mouseState.X, -mouseState.Y));
|
||||
|
||||
if (keyboardState.IsKeyDown(Keys.I))
|
||||
{
|
||||
SendMessage(new RotateCameraMessage(cameraEntity, 0, 3));
|
||||
}
|
||||
|
||||
if (keyboardState.IsKeyDown(Keys.K))
|
||||
{
|
||||
SendMessage(new RotateCameraMessage(cameraEntity, 0, -3));
|
||||
}
|
||||
|
||||
if (keyboardState.IsKeyDown(Keys.J))
|
||||
{
|
||||
SendMessage(new RotateCameraMessage(cameraEntity, 3, 0));
|
||||
}
|
||||
|
||||
if (keyboardState.IsKeyDown(Keys.L))
|
||||
{
|
||||
SendMessage(new RotateCameraMessage(cameraEntity, -3, 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue