Skip to content
Snippets Groups Projects
Commit 07527c10 authored by Vesa Lappalainen's avatar Vesa Lappalainen :bicyclist:
Browse files

AngryLego KaannaMailaa

parent 8428573d
No related branches found
No related tags found
No related merge requests found
......@@ -70,10 +70,27 @@ public class AngryLego : PhysicsGame
Camera.ZoomToLevel();
Keyboard.Listen(Key.F1, ButtonState.Pressed, ShowControlHelp, "Show help");
Keyboard.Listen(Key.Up, ButtonState.Pressed, KaannaMailaa, "Move up", 5.0);
Keyboard.Listen(Key.Down, ButtonState.Pressed, KaannaMailaa, "Move down", -5.0);
PhoneBackButton.Listen(ConfirmExit, "Lopeta peli");
Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli");
}
/// <summary>
/// Käännetään mailaa
/// </summary>
/// <param name="kulma">millä kulmalla käännetään</param>
private void KaannaMailaa(double kulma)
{
maila.Angle += Angle.FromDegrees(kulma);
}
/// <summary>
/// Luodaan seinäelementti
/// </summary>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment