Pro_Unit

HealthIsZero

Nov 30th, 2020
394
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using Platformer.Core;
  2. using Platformer.Mechanics;
  3. using static Platformer.Core.Simulation;
  4.  
  5. namespace Platformer.Gameplay
  6. {
  7.     /// <summary>
  8.     /// Fired when the player health reaches 0. This usually would result in a
  9.     /// PlayerDeath event.
  10.     /// </summary>
  11.     /// <typeparam name="HealthIsZero"></typeparam>
  12.     public class HealthIsZero : Simulation.Event<HealthIsZero>
  13.     {
  14.         public Health health;
  15.  
  16.         public override void Execute()
  17.         {
  18.             Schedule<PlayerDeath>();
  19.         }
  20.     }
  21. }
RAW Paste Data