Ignore:
Timestamp:
2016-07-07 17:50:23 (3 years ago)
Author:
sieerinn
Message:

Pelaajille Die-metodi ja pelaajat hajoaa palasiksi kuollessaan

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 2016/27/ohjaajat/VenienteFragore/VenienteFragore/VenienteFragore/Player.cs

    r7976 r7981  
    2626        private double jumpForce; 
    2727 
     28        public event Action Died; 
     29 
    2830        public Player(double width, double height) : base(width, height) 
    2931        { 
     
    4648            IgnoresGravity = true; 
    4749            Position = new Vector(double.MinValue, double.MinValue); 
     50        } 
     51 
     52        public void Die() 
     53        { 
     54            Died?.Invoke(); 
     55            Destroy(); 
    4856        } 
    4957 
Note: See TracChangeset for help on using the changeset viewer.