- Timestamp:
- 2015-06-09 15:04:34 (8 years ago)
- Location:
- 2015/24/VeetiI/LABYRINTTI/LABYRINTTI
- Files:
-
- 3 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
2015/24/VeetiI/LABYRINTTI/LABYRINTTI/LABYRINTTI/LABYRINTTI.cs
r5941 r5950 9 9 public class LABYRINTTI : PhysicsGame 10 10 { 11 PhysicsObject pelaaja1; 12 Image olionKuva = LoadImage("labyrinttipelihahmo2015"); 13 11 14 public override void Begin() 12 15 { 13 // TODO: Kirjoita ohjelmakoodisi tähän 16 pelaaja1 = new PhysicsObject(200, 200); 17 Add(pelaaja1); 18 pelaaja1.Image = olionKuva; 19 Shape muoto = Shape.FromImage(olionKuva); 20 pelaaja1.Shape = muoto; 14 21 15 PhoneBackButton.Listen(ConfirmExit, "Lopeta peli"); 22 23 Level.Background.Color = Color.Maroon; 24 25 26 Keyboard.Listen(Key.D, ButtonState.Down, 27 LiikutaPelaajaa, null, new Vector(1000, 0)); 28 Keyboard.Listen(Key.A, ButtonState.Down, 29 LiikutaPelaajaa, null, new Vector(-1000, 0)); 30 Keyboard.Listen(Key.W, ButtonState.Down, 31 LiikutaPelaajaa, null, new Vector(0, 1000)); 32 Keyboard.Listen(Key.S, ButtonState.Down, 33 LiikutaPelaajaa, null, new Vector(0, -1000)); 34 35 16 36 Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli"); 17 37 } 18 38 19 void TestMethod()39 void LiikutaPelaajaa(Vector vektori) 20 40 { 21 41 42 pelaaja1.Push(vektori); 22 43 } 44 45 46 47 23 48 } 49 // TODO: Kirjoita ohjelmakoodisi tähän 50 51 52 53 54 55
Note: See TracChangeset
for help on using the changeset viewer.