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))); }
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)); }
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, }; }
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++; }
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++; } }