Skip to content
Snippets Groups Projects
Commit 47ba0126 authored by Kopperoinen Paulus Juho's avatar Kopperoinen Paulus Juho
Browse files

Poistin kaikki loput huomautukset

parent 4531ed62
No related branches found
No related tags found
No related merge requests found
using System.Collections.Generic;
using Jypeli;
// ReSharper disable InconsistentNaming
// ReSharper disable UseIndexFromEndExpression
// ReSharper disable once IdentifierTypo
// ReSharper disable CommentTypo
// ReSharper disable StringLiteralTypo
namespace matopeli;
/// @author Paulus Kopperoinen
......@@ -31,19 +36,21 @@ public class Matopeli : PhysicsGame
"#o #",
"#####################",
};
private Objektit _mato;
private Objektit _omena;
private Objektit _matoMuu;
public IntMeter Pistelaskuri;
private IntMeter Pistelaskuri;
public IntMeter Ennatyslaskuri;
public List<Vector> MatoSijainti = new List<Vector>();
public List<PhysicsObject> MatoKeho = new List<PhysicsObject>();
public int Leveys;
public int Korkeus;
public double Nopeus;
private readonly List<Vector> MatoSijainti = new List<Vector>();
private readonly List<PhysicsObject> MatoKeho = new List<PhysicsObject>();
private int Leveys;
private int Korkeus;
private double Nopeus;
private Vector _omenaAlkuPaikka;
......@@ -58,7 +65,6 @@ public class Matopeli : PhysicsGame
private bool _suuntaVasen;
private bool _matoLiikkunut;
private bool _omenaKentalla;
......@@ -71,7 +77,7 @@ public class Matopeli : PhysicsGame
/// <summary>
/// Poistaa vanhan pelin tiedot ja alustaa uuden pelin
/// </summary>
public void AloitaUusiPeli()
private void AloitaUusiPeli()
{
MatoKeho.Clear();
MatoSijainti.Clear();
......@@ -109,14 +115,12 @@ public class Matopeli : PhysicsGame
void LuoPistelaskuri()
{
Pistelaskuri = new IntMeter(0);
Label pistenaytto = new Label();
pistenaytto.X = Screen.Left + 500;
pistenaytto.Y = Screen.Top - 10;
pistenaytto.TextColor = Color.Black;
pistenaytto.Color = Color.White;
pistenaytto.Y = Screen.Top - 5;
pistenaytto.TextColor = Color.Brown;
pistenaytto.Color = Color.LightGreen;
pistenaytto.Title = "Pisteet: ";
pistenaytto.BindTo(Pistelaskuri);
Add(pistenaytto);
}
......@@ -420,7 +424,6 @@ public class Matopeli : PhysicsGame
_mato.Angle = Angle.FromDegrees(180);
}
_matoLiikkunut = true;
}
......@@ -458,17 +461,4 @@ public class Matopeli : PhysicsGame
IgnoresCollisionResponse = true;
}
}
}
\ No newline at end of file
}
\ No newline at end of file
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