private SentakkiHitObject createTouchNote(HitObject original) { return(new Touch { Samples = original.Samples, StartTime = original.StartTime, Position = SentakkiExtensions.GetCircularPosition(rng.Next(200), rng.Next(360)) }); }
// Covers DX Straight 3-7 public static SentakkiSlidePath GenerateStraightPattern(int end) { var controlPoints = new List <PathControlPoint> { new PathControlPoint(SentakkiExtensions.GetPositionAlongLane(SentakkiPlayfield.INTERSECTDISTANCE, 0), PathType.Linear), new PathControlPoint(getPositionInBetween(SentakkiExtensions.GetPositionAlongLane(SentakkiPlayfield.INTERSECTDISTANCE, 0), SentakkiExtensions.GetPositionAlongLane(SentakkiPlayfield.INTERSECTDISTANCE, end)), PathType.Linear), new PathControlPoint(SentakkiExtensions.GetPositionAlongLane(SentakkiPlayfield.INTERSECTDISTANCE, end), PathType.Linear), }.ToArray(); return(new SentakkiSlidePath(controlPoints, end)); }
public LaneReceptor() { Position = SentakkiExtensions.GetCircularPosition(SentakkiPlayfield.INTERSECTDISTANCE, 0); Size = new Vector2(300); Anchor = Anchor.Centre; Origin = Anchor.Centre; CornerRadius = 150; CornerExponent = 2; currentKeys.BindValueChanged(handleKeyPress); }
public static List <SentakkiHitObject> CreateTapFromTicks(HitObject original, int path, IBeatmap beatmap, Random rng) { var curve = original as IHasCurve; double spanDuration = curve.Duration / (curve.RepeatCount + 1); bool isRepeatSpam = spanDuration < 75 && curve.RepeatCount > 0; List <SentakkiHitObject> hitObjects = new List <SentakkiHitObject>(); if (isRepeatSpam) { return(hitObjects); } var difficulty = beatmap.BeatmapInfo.BaseDifficulty; var controlPointInfo = beatmap.ControlPointInfo; TimingControlPoint timingPoint = controlPointInfo.TimingPointAt(original.StartTime); DifficultyControlPoint difficultyPoint = controlPointInfo.DifficultyPointAt(original.StartTime); double scoringDistance = 100 * difficulty.SliderMultiplier * difficultyPoint.SpeedMultiplier; var velocity = scoringDistance / timingPoint.BeatLength; var tickDistance = scoringDistance / difficulty.SliderTickRate; double legacyLastTickOffset = (original as IHasLegacyLastTickOffset)?.LegacyLastTickOffset ?? 0; foreach (var e in SliderEventGenerator.Generate(original.StartTime, spanDuration, velocity, tickDistance, curve.Path.Distance, curve.RepeatCount + 1, legacyLastTickOffset)) { int newPath = path; while (newPath == path) { newPath = rng.Next(0, 8); } switch (e.Type) { case SliderEventType.Tick: case SliderEventType.Repeat: hitObjects.Add(new Tap { NoteColor = Color4.Orange, Angle = newPath.GetAngleFromPath(), Samples = getTickSamples(original.Samples), StartTime = e.Time, EndPosition = SentakkiExtensions.GetPosition(SentakkiPlayfield.INTERSECTDISTANCE, newPath), Position = SentakkiExtensions.GetPosition(SentakkiPlayfield.NOTESTARTDISTANCE, newPath), }); break; } } return(hitObjects); }
static SentakkiPatternGenerator() { var tmp = new List <Vector2>() { Vector2.Zero }; foreach (var angle in SentakkiPlayfield.LANEANGLES) { tmp.Add(SentakkiExtensions.GetCircularPosition(190, angle - 22.5f)); tmp.Add(SentakkiExtensions.GetCircularPosition(130, angle)); } VALID_TOUCH_POSITIONS = tmp; }
public static List <SentakkiHitObject> CreateHoldNote(HitObject original, int path, IBeatmap beatmap, Random rng, bool experimental) { var curveData = original as IHasCurve; List <SentakkiHitObject> notes = new List <SentakkiHitObject>(); bool twin = curveData.NodeSamples.Any(s => s.Any(s => s.Name == HitSampleInfo.HIT_CLAP)); notes.Add(new Hold { NoteColor = Color4.Crimson, Angle = path.GetAngleFromPath(), NodeSamples = curveData.NodeSamples, StartTime = original.StartTime, EndTime = original.GetEndTime(), EndPosition = SentakkiExtensions.GetPosition(SentakkiPlayfield.INTERSECTDISTANCE, path), Position = SentakkiExtensions.GetPosition(SentakkiPlayfield.NOTESTARTDISTANCE, path), }); if (experimental) { if (twin) { int newPath = path; while (path == newPath) { newPath = rng.Next(0, 8); } notes.Add(new Hold { NoteColor = Color4.Crimson, Angle = newPath.GetAngleFromPath(), NodeSamples = curveData.NodeSamples, StartTime = original.StartTime, EndTime = original.GetEndTime(), EndPosition = SentakkiExtensions.GetPosition(SentakkiPlayfield.INTERSECTDISTANCE, newPath), Position = SentakkiExtensions.GetPosition(SentakkiPlayfield.NOTESTARTDISTANCE, newPath), }); } else { var taps = CreateTapFromTicks(original, path, beatmap, rng); if (taps.Any()) { notes.AddRange(taps); } } } return(notes); }
public void Apply(JudgementResult result, DrawableHitObject hitObject) { this.result = result.Type; judgementPiece.JudgementText.Text = result.Type.GetDisplayNameForSentakkiResult().ToUpperInvariant(); judgementPiece.JudgementText.Colour = result.Type.GetColorForSentakkiResult(); if (result.HitObject.HitWindows is HitWindows.EmptyHitWindows || result.Type == HitResult.Miss || !detailedJudgements.Value) { timingPiece.Alpha = 0; } else { timingPiece.Alpha = 1; if (result.TimeOffset >= 16) { timingPiece.Text = "LATE"; timingPiece.Colour = Color4.OrangeRed; } else if (result.TimeOffset <= -16) { timingPiece.Text = "EARLY"; timingPiece.Colour = Color4.GreenYellow; } else { timingPiece.Text = "CRITICAL"; timingPiece.Colour = Color4.Orange; } } LifetimeStart = result.TimeAbsolute; switch (hitObject) { case DrawableSentakkiLanedHitObject laned: Position = SentakkiExtensions.GetPositionAlongLane(240, laned.HitObject.Lane); Rotation = laned.HitObject.Lane.GetRotationForLane(); break; default: Position = hitObject.Position; Rotation = 0; break; } }
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) { var localPos = ToLocalSpace(screenSpacePos); var angleDelta = SentakkiExtensions.GetDeltaAngle(0, Vector2.Zero.GetDegreesFromPosition(localPos)); if (Math.Abs(angleDelta) > receptor_angle_range / 2) { return(false); } var distance = Vector2.DistanceSquared(Vector2.Zero, localPos); if (distance < 200 * 200 || distance > 400 * 400) { return(false); } return(true); }
public void Apply(JudgementResult result, DrawableHitObject hitObject) { this.result = result.Type; judgementBody.JudgementText.Text = result.Type.GetDescription().ToUpperInvariant(); judgementBody.JudgementText.Colour = colours.ForHitResult(result.Type); LifetimeStart = result.TimeAbsolute; switch (hitObject) { case DrawableSentakkiLanedHitObject laned: Position = SentakkiExtensions.GetPositionAlongLane(240, laned.HitObject.Lane); Rotation = laned.HitObject.Lane.GetRotationForLane(); break; default: Position = hitObject.Position; Rotation = 0; break; } }
private void createHitObjects(int amount = 1) { for (int i = 0; i < amount; ++i) { var lane = RNG.Next(0, 8); var ho = new Tap { StartTime = Time.Current + 1000, Lane = lane }; lineRenderer.AddHitObject(ho); Add(new Circle { Size = new Vector2(20), Colour = Color4.White, LifetimeEnd = Time.Current + 1000, Anchor = Anchor.Centre, Origin = Anchor.Centre, Position = SentakkiExtensions.GetPositionAlongLane(300, lane) }); } }
public void Apply(SentakkiLanedHitObject lanedHitObject) { Position = SentakkiExtensions.GetPositionAlongLane(SentakkiPlayfield.INTERSECTDISTANCE, lanedHitObject.Lane); Colour = lanedHitObject.NoteColour; }
static Vector2 lanestart(int x) => SentakkiExtensions.GetPositionAlongLane(SentakkiPlayfield.INTERSECTDISTANCE, x);
public static List <SentakkiHitObject> CreateTapNote(HitObject original, int path, Random rng, bool experimental = false) { List <SentakkiHitObject> notes = new List <SentakkiHitObject>(); bool strong = original.Samples.Any(s => s.Name == HitSampleInfo.HIT_FINISH); bool twin = original.Samples.Any(s => s.Name == HitSampleInfo.HIT_CLAP); if (strong) { notes.Add(new Break { NoteColor = Color4.OrangeRed, Angle = path.GetAngleFromPath(), Samples = original.Samples, StartTime = original.StartTime, EndPosition = SentakkiExtensions.GetPosition(SentakkiPlayfield.INTERSECTDISTANCE, path), Position = SentakkiExtensions.GetPosition(SentakkiPlayfield.NOTESTARTDISTANCE, path), }); if (twin && experimental) { int newPath = path; while (path == newPath) { newPath = rng.Next(0, 8); } notes.Add(new Break { NoteColor = Color4.OrangeRed, Angle = newPath.GetAngleFromPath(), Samples = original.Samples, StartTime = original.StartTime, EndPosition = SentakkiExtensions.GetPosition(SentakkiPlayfield.INTERSECTDISTANCE, newPath), Position = SentakkiExtensions.GetPosition(SentakkiPlayfield.NOTESTARTDISTANCE, newPath), }); } } else { notes.Add(new Tap { NoteColor = Color4.Orange, Angle = path.GetAngleFromPath(), Samples = original.Samples, StartTime = original.StartTime, EndPosition = SentakkiExtensions.GetPosition(SentakkiPlayfield.INTERSECTDISTANCE, path), Position = SentakkiExtensions.GetPosition(SentakkiPlayfield.NOTESTARTDISTANCE, path), }); if (twin && experimental) { int newPath = path; while (path == newPath) { newPath = rng.Next(0, 8); } notes.Add(new Tap { NoteColor = Color4.Orange, Angle = newPath.GetAngleFromPath(), Samples = original.Samples, StartTime = original.StartTime, EndPosition = SentakkiExtensions.GetPosition(SentakkiPlayfield.INTERSECTDISTANCE, newPath), Position = SentakkiExtensions.GetPosition(SentakkiPlayfield.NOTESTARTDISTANCE, newPath), }); } } return(notes); }