コード例 #1
0
        public void Run()
        {
            Random random    = new Random();
            var    world     = Origin.GetWorld();
            var    alive     = Target.GetBehavior <BehaviorAlive>();
            var    sword     = Origin.GetBehavior <BehaviorSword>();
            var    bloodfire = Origin.GetBehavior <BehaviorSkillBloodfireBlade>();

            bloodfire.Extinguish();

            new TimeFade(world, 0.05f, LerpHelper.ExponentialIn, 40);

            Target.GetFlashHelper()?.AddFlash(ColorMatrix.Flat(Color.White), 5);
            Target.GetShakeHelper()?.AddShakeRandom(3, LerpHelper.QuadraticOut, 5);
            new HitStop(world, 0, 5);

            alive.SetDamage(alive.HP);

            Target.GetFlashHelper()?.AddFlash(ColorMatrix.Translate(new Color(255, 64, 16)), LerpHelper.Invert(LerpHelper.QuadraticOut), (int)ExplosionTime.EndTime, false);
            Target.GetShakeHelper()?.AddShakeRandom(3, LerpHelper.Invert(LerpHelper.QuadraticOut), (int)ExplosionTime.EndTime, false);

            if (alive.CurrentDead)
            {
                if (Origin == world.PlayerCurio)
                {
                    world.RunStats.Kills += 1;
                }
            }

            if (sword != null)
            {
                sword.HasBlood = false;
            }
        }
コード例 #2
0
        public void Run()
        {
            var world = Origin.GetWorld();
            var sword = Origin.GetBehavior <BehaviorSword>();
            var alive = Origin.GetBehavior <BehaviorAlive>();

            if (HasBlood && alive != null)
            {
                alive.HealDamage(Heal);
                sword.HasBlood = false;
                Origin.GetFlashHelper().AddFlash(ColorMatrix.Translate(Color.Lime), 4);
                Eat.Play(1, 0, 0);
            }
        }