예제 #1
0
        private void EmitWraith()
        {
            var targetTile = Target.GetMainTile().GetNearby(5).ToList().Pick(Random);

            var wraith = new Curio(Template.Wraith);

            wraith.MoveTo(targetTile);
            Behavior.Apply(new BehaviorWraith(wraith, Origin.GetVisualTarget(), Random.NextFloat(10, 30)));
        }
예제 #2
0
        private void EmitWraith(ICurio target)
        {
            var emitTile   = Curio.GetMainTile();
            var targetTile = target.GetMainTile().GetNearby(5).ToList().Pick(Random);

            var wraith = new Curio(Template.Wraith);

            wraith.MoveTo(targetTile);
            Behavior.Apply(new BehaviorWraith(wraith, emitTile.VisualTarget, Random.NextFloat(30, 70)));
            SoundEmit.Play(1f, Random.NextFloat(-1, +1), Random.NextFloat(-1, +1));
        }
예제 #3
0
        private void SummonWraiths(SceneGame world, BehaviorLich lich)
        {
            var target = world.PlayerCurio;

            for (int i = 0; i < 4; i++)
            {
                var targetTile = target.GetMainTile().GetNearby(5).ToList().Pick(Random);

                var wraith = new Curio(Template.Wraith);
                wraith.MoveTo(targetTile);
                Behavior.Apply(new BehaviorWraith(wraith, Origin.GetVisualTarget() + Util.AngleToVector(lich.SwordAngle) * 8 * i, Random.NextFloat(30, 60)));
            }
        }
        public void OnMove(EventMove.Finish e)
        {
            if (e.Curio != Curio)
            {
                return;
            }

            var orientable = Curio.GetBehavior <BehaviorOrientable>();

            var trail = new Curio(Template.BloodThornTrail);

            trail.MoveTo(e.Source);
            trail.GetBehavior <BehaviorTrailBloodThorn>().Shooter = Projectile.Shooter;
            new TrailParticle(Curio.GetWorld(), SpriteLoader.Instance.AddSprite("content/bloodthorn"), Curio.GetVisualTarget(), 30)
            {
                Angle    = orientable.Angle,
                FadeLerp = LerpHelper.QuadraticIn,
            };
        }
예제 #5
0
        private void FireDaggers()
        {
            var world = Origin.GetWorld();
            var tile  = Origin.GetMainTile();

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

            int index    = 0;
            var position = SlashEnd;
            var angle    = Origin.GetAngle() + position * MathHelper.PiOver4;
            var offset   = Util.AngleToVector(angle).ToTileOffset();
            var neighbor = tile.GetNeighborOrNull(offset.X, offset.Y);

            if (neighbor != null)
            {
                var dagger = new Curio(Template.BloodThorn);
                dagger.MoveTo(tile);
                dagger.GetBehavior <BehaviorProjectile>().Fire(Origin, Util.AngleToVector(angle), 3, 20);
            }
            index++;
        }
예제 #6
0
        private void FireDaggers()
        {
            var world         = Origin.GetWorld();
            var tile          = Origin.GetMainTile();
            var areaPositions = Enumerable.Range(Math.Min(SlashStart, SlashEnd), Math.Abs(SlashEnd - SlashStart) + 1);

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

            int index = 0;

            foreach (var position in areaPositions)
            {
                var angle    = Origin.GetAngle() + position * MathHelper.PiOver4;
                var offset   = Util.AngleToVector(angle).ToTileOffset();
                var neighbor = tile.GetNeighborOrNull(offset.X, offset.Y);
                if (neighbor != null)
                {
                    var dagger = new Curio(Template.EnergyKnife);
                    dagger.MoveTo(tile);
                    dagger.GetBehavior <BehaviorProjectile>().Fire(Origin, Util.AngleToVector(angle), 3, 20);
                }
                index++;
            }
        }