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

live23 x viitemuuttujaksi

parent 544f7bee
No related branches found
No related tags found
No related merge requests found
...@@ -15,9 +15,9 @@ public class Pallot : PhysicsGame ...@@ -15,9 +15,9 @@ public class Pallot : PhysicsGame
double x = -200; double x = -200;
PhysicsObject p = Luo(this, 100, 100); PhysicsObject p = Luo(this, 100, 100);
pallo = Lisaa(this, x += 100); pallo = Lisaa(this, ref x);
pallo.Color = Color.Yellow; pallo.Color = Color.Yellow;
pallo = Lisaa(this, x += 100); pallo = Lisaa(this, ref x);
Vaihda(pallo, Color.Red); Vaihda(pallo, Color.Red);
Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli"); Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli");
} }
...@@ -29,9 +29,9 @@ public class Pallot : PhysicsGame ...@@ -29,9 +29,9 @@ public class Pallot : PhysicsGame
} }
public static PhysicsObject Lisaa(Pallot peli, double x) public static PhysicsObject Lisaa(Pallot peli, ref double x)
{ {
// x += 100; x += 100;
return Luo(peli, x, -200); return Luo(peli, x, -200);
} }
......
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