Ignore:
Timestamp:
2013-07-04 15:34:20 (6 years ago)
Author:
jumakall
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 2013/27/TeemuM/Game/Game/Game/Player.cs

    r4426 r4446  
    2222    { 
    2323        this.health = new IntMeter(health, 0, health); 
    24         this.health.LowerLimit += UI.GameOver; 
     24        this.health.LowerLimit += delegate 
     25        { 
     26            GameObject layer = new GameObject(Game.Screen.Width, Game.Screen.Height); 
     27            layer.Color = Color.Transparent; 
     28            layer.Position = this.Position; 
     29            Game.Add(layer, 1); 
     30            layer.FadeColorTo(Color.Lerp(Color.Transparent, Color.Black, 0.8), 1.0); 
     31 
     32            Label t = new Label("Game over"); 
     33            t.Position = this.Position; 
     34            Game.Add(t); 
     35 
     36            Timer.SingleShot(1, delegate { Game.IsPaused = true; }); 
     37 
     38            this.Destroy(); 
     39        }; 
    2540        this.Tag = "player"; 
    2641        this.Shape = Shape.Rectangle; 
Note: See TracChangeset for help on using the changeset viewer.