Esempio n. 1
0
 public ColorMatrix GetColor()
 {
     if (CurrentDead)
     {
         return(ColorMatrix.Greyscale() * ColorMatrix.Tint(Color.IndianRed));
     }
     return(ColorMatrix.Identity);
 }
Esempio n. 2
0
        public void Run()
        {
            Random random = new Random();
            var    world  = Origin.GetWorld();
            var    alive  = Target.GetBehavior <BehaviorAlive>();

            Target.GetFlashHelper()?.AddFlash(ColorMatrix.Flat(Color.White), 20);
            Target.GetShakeHelper()?.AddShakeRandom(3, LerpHelper.QuadraticOut, 30);
            new HitStop(world, 0, 5);
            new ScreenShakeRandom(world, 10, 10, LerpHelper.QuadraticOut);
            new ScreenFlashSimple(world, ColorMatrix.Greyscale() * ColorMatrix.Tint(new Color(215, 63, 36)), LerpHelper.QuadraticOut, 10);
            HitSound.Play(1, Random.NextFloat(-0.5f, +0.5f), 0);

            alive.TakeDamage(Damage);
        }