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

attribuutit poistettu

parent 9f4cee50
No related branches found
No related tags found
No related merge requests found
using System;
using System.Collections.Generic;
using System.Security.Cryptography.X509Certificates;
using Jypeli;
using Jypeli.Assets;
using Jypeli.Controls;
......@@ -9,29 +10,29 @@ using Jypeli.Widgets;
namespace Pallot;
public class Pallot : PhysicsGame
{
private PhysicsObject pallo;
private double x = -200;
public override void Begin()
{
double x = -200;
PhysicsObject p = Luo(this, 100, 100);
Lisaa();
PhysicsObject pallo = Lisaa(this, ref x);
pallo.Color = Color.Yellow;
Lisaa();
Vaihda(Color.Red);
pallo = Lisaa(this, ref x);
Vaihda(pallo, Color.Red);
Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli");
}
public void Vaihda(Color c)
public static void Vaihda(PhysicsObject pallo, Color c)
{
pallo.Color = c;
}
public void Lisaa()
public static PhysicsObject Lisaa(Game peli, ref double x)
{
pallo = Luo(this, x += 100, -200);
double uusiX = x + 100;
x = uusiX;
return Luo(peli, uusiX, -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