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

HangryDog varoituksia pois

parent cd0d55bf
No related branches found
No related tags found
No related merge requests found
......@@ -54,6 +54,6 @@ public class HangryDog : PhysicsGame
{
// var luu = new Luu(this, 50, 20, RandomGen.NextVector(Level.BoundingRect));
var juusto = new Juusto(this, 50, RandomGen.NextVector(Level.BoundingRect));
var hiiri = new Hiiri(this, 70, RandomGen.NextVector(Level.BoundingRect), juusto);
var _ = new Hiiri(this, 70, RandomGen.NextVector(Level.BoundingRect), juusto);
}
}
using System;
using Jypeli;
using Jypeli.Effects;
// ReSharper disable MemberCanBeProtected.Global
namespace HangryDog;
......@@ -16,7 +17,7 @@ public class Efektit
Timer timer = new Timer();
timer.Interval = 3;
timer.Start();
timer.Timeout += delegate()
timer.Timeout += delegate
{
savu.Destroy();
timer.Stop();
......@@ -46,7 +47,7 @@ public class Luu : Syotava
public Luu(PhysicsGame peli, double w, Vector p)
: base(peli, w, p, "luu", 2000)
{
this.Destroyed += delegate() { Efektit.Savuta(peli, this); };
this.Destroyed += delegate { Efektit.Savuta(peli, this); };
}
}
......@@ -56,17 +57,17 @@ public class Juusto : Syotava
public Juusto(PhysicsGame peli, double w, Vector p)
: base(peli, w, p, "juusto", 50000)
{
this.Destroyed += delegate() { Efektit.Savuta(peli, this); };
this.Destroyed += delegate { Efektit.Savuta(peli, this); };
}
}
public class Elain : PhysicsObject // PlatformCharacter
{
private string nimi;
private readonly string nimi;
public string Nimi { get { return nimi; } }
private bool vasen = false;
private bool vasen ;
public Elain(PhysicsGame peli, double w, Vector p, string nimi, string tunniste)
: base(w, w)
......@@ -149,7 +150,7 @@ public class Hiiri : Elain
{
this.LifetimeLeft = new TimeSpan(0, 0, 0, 10);
peli.AddCollisionHandler(this, "juusto", Syo);
this.Destroyed += delegate() { new Luu(peli, Width * 0.8, Position); };
this.Destroyed += delegate { var _ =new Luu(peli, Width * 0.8, Position); };
FollowerBrain brain = new FollowerBrain(juusto);
this.Brain = brain;
}
......
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