mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 23:24:04 +09:00
Merge remote-tracking branch 'origin/master' into netstandard
This commit is contained in:
@ -16,29 +16,13 @@ namespace osu.Game.Rulesets.Catch.Beatmaps
|
||||
{
|
||||
public override void PostProcess(Beatmap<CatchHitObject> beatmap)
|
||||
{
|
||||
if (beatmap.ComboColors.Count == 0)
|
||||
return;
|
||||
|
||||
int index = 0;
|
||||
int colourIndex = 0;
|
||||
|
||||
CatchHitObject lastObj = null;
|
||||
|
||||
initialiseHyperDash(beatmap.HitObjects);
|
||||
|
||||
base.PostProcess(beatmap);
|
||||
|
||||
int index = 0;
|
||||
foreach (var obj in beatmap.HitObjects)
|
||||
{
|
||||
if (obj.NewCombo)
|
||||
{
|
||||
if (lastObj != null) lastObj.LastInCombo = true;
|
||||
colourIndex = (colourIndex + 1) % beatmap.ComboColors.Count;
|
||||
}
|
||||
|
||||
obj.IndexInBeatmap = index++;
|
||||
obj.ComboColour = beatmap.ComboColors[colourIndex];
|
||||
|
||||
lastObj = obj;
|
||||
}
|
||||
}
|
||||
|
||||
private void initialiseHyperDash(List<CatchHitObject> objects)
|
||||
|
@ -10,6 +10,8 @@ using osu.Game.Rulesets.UI;
|
||||
using System.Collections.Generic;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Input.Bindings;
|
||||
using osu.Game.Rulesets.Catch.Replays;
|
||||
using osu.Game.Rulesets.Replays.Types;
|
||||
|
||||
namespace osu.Game.Rulesets.Catch
|
||||
{
|
||||
@ -99,7 +101,9 @@ namespace osu.Game.Rulesets.Catch
|
||||
|
||||
public override DifficultyCalculator CreateDifficultyCalculator(Beatmap beatmap, Mod[] mods = null) => new CatchDifficultyCalculator(beatmap);
|
||||
|
||||
public override int LegacyID => 2;
|
||||
public override int? LegacyID => 2;
|
||||
|
||||
public override IConvertibleReplayFrame CreateConvertibleReplayFrame() => new CatchReplayFrame();
|
||||
|
||||
public CatchRuleset(RulesetInfo rulesetInfo = null)
|
||||
: base(rulesetInfo)
|
||||
|
@ -7,6 +7,6 @@ namespace osu.Game.Rulesets.Catch.Mods
|
||||
{
|
||||
public class CatchModDaycore : ModDaycore
|
||||
{
|
||||
public override double ScoreMultiplier => 0.5;
|
||||
public override double ScoreMultiplier => 0.3;
|
||||
}
|
||||
}
|
||||
|
@ -7,5 +7,6 @@ namespace osu.Game.Rulesets.Catch.Mods
|
||||
{
|
||||
public class CatchModEasy : ModEasy
|
||||
{
|
||||
public override string Description => @"Larger fruits, more forgiving HP drain, less accuracy required, and three lives!";
|
||||
}
|
||||
}
|
||||
|
@ -7,6 +7,6 @@ namespace osu.Game.Rulesets.Catch.Mods
|
||||
{
|
||||
public class CatchModHalfTime : ModHalfTime
|
||||
{
|
||||
public override double ScoreMultiplier => 0.5;
|
||||
public override double ScoreMultiplier => 0.3;
|
||||
}
|
||||
}
|
||||
|
@ -8,6 +8,5 @@ namespace osu.Game.Rulesets.Catch.Mods
|
||||
public class CatchModHardRock : ModHardRock
|
||||
{
|
||||
public override double ScoreMultiplier => 1.12;
|
||||
public override bool Ranked => true;
|
||||
}
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ namespace osu.Game.Rulesets.Catch.Mods
|
||||
{
|
||||
public class CatchModHidden : ModHidden
|
||||
{
|
||||
public override string Description => @"Play with fading notes for a slight score advantage.";
|
||||
public override string Description => @"Play with fading fruits.";
|
||||
public override double ScoreMultiplier => 1.06;
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,6 @@
|
||||
|
||||
using osu.Framework.MathUtils;
|
||||
using osu.Game.Rulesets.Objects.Types;
|
||||
using OpenTK.Graphics;
|
||||
|
||||
namespace osu.Game.Rulesets.Catch.Objects
|
||||
{
|
||||
@ -32,25 +31,11 @@ namespace osu.Game.Rulesets.Catch.Objects
|
||||
AddNested(new Banana
|
||||
{
|
||||
Samples = Samples,
|
||||
ComboColour = getNextComboColour(),
|
||||
StartTime = i,
|
||||
X = RNG.NextSingle()
|
||||
});
|
||||
}
|
||||
|
||||
private Color4 getNextComboColour()
|
||||
{
|
||||
switch (RNG.Next(0, 3))
|
||||
{
|
||||
default:
|
||||
return new Color4(255, 240, 0, 255);
|
||||
case 1:
|
||||
return new Color4(255, 192, 0, 255);
|
||||
case 2:
|
||||
return new Color4(214, 221, 28, 255);
|
||||
}
|
||||
}
|
||||
|
||||
public double EndTime => StartTime + Duration;
|
||||
|
||||
public double Duration { get; set; }
|
||||
|
@ -5,24 +5,25 @@ using osu.Game.Beatmaps;
|
||||
using osu.Game.Beatmaps.ControlPoints;
|
||||
using osu.Game.Rulesets.Objects;
|
||||
using osu.Game.Rulesets.Objects.Types;
|
||||
using OpenTK.Graphics;
|
||||
|
||||
namespace osu.Game.Rulesets.Catch.Objects
|
||||
{
|
||||
public abstract class CatchHitObject : HitObject, IHasXPosition, IHasCombo
|
||||
public abstract class CatchHitObject : HitObject, IHasXPosition, IHasComboInformation
|
||||
{
|
||||
public const double OBJECT_RADIUS = 44;
|
||||
|
||||
public float X { get; set; }
|
||||
|
||||
public Color4 ComboColour { get; set; }
|
||||
|
||||
public int IndexInBeatmap { get; set; }
|
||||
|
||||
public virtual FruitVisualRepresentation VisualRepresentation => (FruitVisualRepresentation)(IndexInBeatmap % 4);
|
||||
|
||||
public virtual bool NewCombo { get; set; }
|
||||
|
||||
public int IndexInCurrentCombo { get; set; }
|
||||
|
||||
public int ComboIndex { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The next fruit starts a new combo. Used for explodey.
|
||||
/// </summary>
|
||||
|
@ -22,7 +22,7 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawable
|
||||
Origin = Anchor.BottomLeft;
|
||||
X = 0;
|
||||
|
||||
Child = bananaContainer = new Container { RelativeSizeAxes = Axes.Both };
|
||||
InternalChild = bananaContainer = new Container { RelativeSizeAxes = Axes.Both };
|
||||
|
||||
foreach (var b in s.NestedHitObjects.Cast<BananaShower.Banana>())
|
||||
AddNested(getVisualRepresentation?.Invoke(b));
|
||||
|
@ -8,6 +8,8 @@ using osu.Game.Rulesets.Objects.Drawables;
|
||||
using osu.Game.Rulesets.Objects.Types;
|
||||
using OpenTK;
|
||||
using osu.Game.Rulesets.Scoring;
|
||||
using osu.Game.Skinning;
|
||||
using OpenTK.Graphics;
|
||||
|
||||
namespace osu.Game.Rulesets.Catch.Objects.Drawable
|
||||
{
|
||||
@ -57,6 +59,14 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawable
|
||||
AddJudgement(new Judgement { Result = CheckPosition.Invoke(HitObject) ? HitResult.Perfect : HitResult.Miss });
|
||||
}
|
||||
|
||||
protected override void SkinChanged(ISkinSource skin, bool allowFallback)
|
||||
{
|
||||
base.SkinChanged(skin, allowFallback);
|
||||
|
||||
if (HitObject is IHasComboInformation combo)
|
||||
AccentColour = skin.GetValue<SkinConfiguration, Color4>(s => s.ComboColours.Count > 0 ? s.ComboColours[combo.ComboIndex % s.ComboColours.Count] : (Color4?)null) ?? Color4.White;
|
||||
}
|
||||
|
||||
private const float preempt = 1000;
|
||||
|
||||
protected override void UpdateState(ArmedState state)
|
||||
|
@ -5,28 +5,39 @@ using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Rulesets.Catch.Objects.Drawable.Pieces;
|
||||
using OpenTK;
|
||||
using OpenTK.Graphics;
|
||||
|
||||
namespace osu.Game.Rulesets.Catch.Objects.Drawable
|
||||
{
|
||||
public class DrawableDroplet : PalpableCatchHitObject<Droplet>
|
||||
{
|
||||
private Pulp pulp;
|
||||
|
||||
public DrawableDroplet(Droplet h)
|
||||
: base(h)
|
||||
{
|
||||
Origin = Anchor.Centre;
|
||||
Size = new Vector2((float)CatchHitObject.OBJECT_RADIUS) / 4;
|
||||
AccentColour = h.ComboColour;
|
||||
Masking = false;
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
Child = new Pulp
|
||||
InternalChild = pulp = new Pulp
|
||||
{
|
||||
AccentColour = AccentColour,
|
||||
Size = Size
|
||||
};
|
||||
}
|
||||
|
||||
public override Color4 AccentColour
|
||||
{
|
||||
get { return base.AccentColour; }
|
||||
set
|
||||
{
|
||||
base.AccentColour = value;
|
||||
pulp.AccentColour = AccentColour;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -24,7 +24,6 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawable
|
||||
Origin = Anchor.Centre;
|
||||
|
||||
Size = new Vector2((float)CatchHitObject.OBJECT_RADIUS);
|
||||
AccentColour = HitObject.ComboColour;
|
||||
Masking = false;
|
||||
|
||||
Rotation = (float)(RNG.NextDouble() - 0.5f) * 40;
|
||||
@ -33,7 +32,10 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawable
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
Children = new[]
|
||||
// todo: this should come from the skin.
|
||||
AccentColour = colourForRrepesentation(HitObject.VisualRepresentation);
|
||||
|
||||
InternalChildren = new[]
|
||||
{
|
||||
createPulp(HitObject.VisualRepresentation),
|
||||
border = new Circle
|
||||
@ -65,7 +67,7 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawable
|
||||
|
||||
if (HitObject.HyperDash)
|
||||
{
|
||||
Add(new Pulp
|
||||
AddInternal(new Pulp
|
||||
{
|
||||
RelativePositionAxes = Axes.Both,
|
||||
Anchor = Anchor.Centre,
|
||||
@ -273,5 +275,31 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawable
|
||||
|
||||
border.Alpha = (float)MathHelper.Clamp((HitObject.StartTime - Time.Current) / 500, 0, 1);
|
||||
}
|
||||
|
||||
private Color4 colourForRrepesentation(FruitVisualRepresentation representation)
|
||||
{
|
||||
switch (representation)
|
||||
{
|
||||
default:
|
||||
case FruitVisualRepresentation.Pear:
|
||||
return new Color4(17, 136, 170, 255);
|
||||
case FruitVisualRepresentation.Grape:
|
||||
return new Color4(204, 102, 0, 255);
|
||||
case FruitVisualRepresentation.Raspberry:
|
||||
return new Color4(121, 9, 13, 255);
|
||||
case FruitVisualRepresentation.Pineapple:
|
||||
return new Color4(102, 136, 0, 255);
|
||||
case FruitVisualRepresentation.Banana:
|
||||
switch (RNG.Next(0, 3))
|
||||
{
|
||||
default:
|
||||
return new Color4(255, 240, 0, 255);
|
||||
case 1:
|
||||
return new Color4(255, 192, 0, 255);
|
||||
case 2:
|
||||
return new Color4(214, 221, 28, 255);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawable
|
||||
Origin = Anchor.BottomLeft;
|
||||
X = 0;
|
||||
|
||||
Child = dropletContainer = new Container { RelativeSizeAxes = Axes.Both, };
|
||||
InternalChild = dropletContainer = new Container { RelativeSizeAxes = Axes.Both, };
|
||||
|
||||
foreach (var o in s.NestedHitObjects.Cast<CatchHitObject>())
|
||||
AddNested(getVisualRepresentation?.Invoke(o));
|
||||
@ -33,7 +33,6 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawable
|
||||
var catchObject = (DrawableCatchHitObject)h;
|
||||
|
||||
catchObject.CheckPosition = o => CheckPosition?.Invoke(o) ?? false;
|
||||
catchObject.AccentColour = HitObject.ComboColour;
|
||||
|
||||
dropletContainer.Add(h);
|
||||
base.AddNested(h);
|
||||
|
@ -60,74 +60,75 @@ namespace osu.Game.Rulesets.Catch.Objects
|
||||
AddNested(new Fruit
|
||||
{
|
||||
Samples = Samples,
|
||||
ComboColour = ComboColour,
|
||||
StartTime = StartTime,
|
||||
X = X
|
||||
});
|
||||
|
||||
for (var span = 0; span < this.SpanCount(); span++)
|
||||
double lastDropletTime = StartTime;
|
||||
|
||||
for (int span = 0; span < this.SpanCount(); span++)
|
||||
{
|
||||
var spanStartTime = StartTime + span * spanDuration;
|
||||
var reversed = span % 2 == 1;
|
||||
|
||||
for (var d = tickDistance; d <= length; d += tickDistance)
|
||||
for (double d = 0; d <= length; d += tickDistance)
|
||||
{
|
||||
if (d > length - minDistanceFromEnd)
|
||||
break;
|
||||
|
||||
var timeProgress = d / length;
|
||||
var distanceProgress = reversed ? 1 - timeProgress : timeProgress;
|
||||
|
||||
var lastTickTime = spanStartTime + timeProgress * spanDuration;
|
||||
AddNested(new Droplet
|
||||
double time = spanStartTime + timeProgress * spanDuration;
|
||||
|
||||
double tinyTickInterval = time - lastDropletTime;
|
||||
while (tinyTickInterval > 100)
|
||||
tinyTickInterval /= 2;
|
||||
|
||||
for (double t = lastDropletTime + tinyTickInterval; t < time; t += tinyTickInterval)
|
||||
{
|
||||
StartTime = lastTickTime,
|
||||
ComboColour = ComboColour,
|
||||
X = Curve.PositionAt(distanceProgress).X / CatchPlayfield.BASE_WIDTH,
|
||||
Samples = new List<SampleInfo>(Samples.Select(s => new SampleInfo
|
||||
double progress = reversed ? 1 - (t - spanStartTime) / spanDuration : (t - spanStartTime) / spanDuration;
|
||||
|
||||
AddNested(new TinyDroplet
|
||||
{
|
||||
Bank = s.Bank,
|
||||
Name = @"slidertick",
|
||||
Volume = s.Volume
|
||||
}))
|
||||
});
|
||||
}
|
||||
StartTime = t,
|
||||
X = X + Curve.PositionAt(progress).X / CatchPlayfield.BASE_WIDTH,
|
||||
Samples = new List<SampleInfo>(Samples.Select(s => new SampleInfo
|
||||
{
|
||||
Bank = s.Bank,
|
||||
Name = @"slidertick",
|
||||
Volume = s.Volume
|
||||
}))
|
||||
});
|
||||
}
|
||||
|
||||
double tinyTickInterval = tickDistance / length * spanDuration;
|
||||
while (tinyTickInterval > 100)
|
||||
tinyTickInterval /= 2;
|
||||
|
||||
for (double t = 0; t < spanDuration; t += tinyTickInterval)
|
||||
{
|
||||
double progress = reversed ? 1 - t / spanDuration : t / spanDuration;
|
||||
|
||||
AddNested(new TinyDroplet
|
||||
if (d > minDistanceFromEnd && Math.Abs(d - length) > minDistanceFromEnd)
|
||||
{
|
||||
StartTime = spanStartTime + t,
|
||||
ComboColour = ComboColour,
|
||||
X = Curve.PositionAt(progress).X / CatchPlayfield.BASE_WIDTH,
|
||||
Samples = new List<SampleInfo>(Samples.Select(s => new SampleInfo
|
||||
AddNested(new Droplet
|
||||
{
|
||||
Bank = s.Bank,
|
||||
Name = @"slidertick",
|
||||
Volume = s.Volume
|
||||
}))
|
||||
});
|
||||
StartTime = time,
|
||||
X = X + Curve.PositionAt(distanceProgress).X / CatchPlayfield.BASE_WIDTH,
|
||||
Samples = new List<SampleInfo>(Samples.Select(s => new SampleInfo
|
||||
{
|
||||
Bank = s.Bank,
|
||||
Name = @"slidertick",
|
||||
Volume = s.Volume
|
||||
}))
|
||||
});
|
||||
}
|
||||
|
||||
lastDropletTime = time;
|
||||
}
|
||||
|
||||
AddNested(new Fruit
|
||||
{
|
||||
Samples = Samples,
|
||||
ComboColour = ComboColour,
|
||||
StartTime = spanStartTime + spanDuration,
|
||||
X = Curve.PositionAt(reversed ? 0 : 1).X / CatchPlayfield.BASE_WIDTH
|
||||
X = X + Curve.PositionAt(reversed ? 0 : 1).X / CatchPlayfield.BASE_WIDTH
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public double EndTime => StartTime + this.SpanCount() * Curve.Distance / Velocity;
|
||||
|
||||
public float EndX => Curve.PositionAt(this.ProgressAt(1)).X / CatchPlayfield.BASE_WIDTH;
|
||||
public float EndX => X + this.CurvePositionAt(1).X / CatchPlayfield.BASE_WIDTH;
|
||||
|
||||
public double Duration => EndTime - StartTime;
|
||||
|
||||
|
@ -63,7 +63,7 @@ namespace osu.Game.Rulesets.Catch.Replays
|
||||
}
|
||||
else if (h.HyperDash)
|
||||
{
|
||||
Replay.Frames.Add(new CatchReplayFrame(h.StartTime - timeAvailable, lastPosition, ReplayButtonState.Right1));
|
||||
Replay.Frames.Add(new CatchReplayFrame(h.StartTime - timeAvailable, lastPosition));
|
||||
Replay.Frames.Add(new CatchReplayFrame(h.StartTime, h.X));
|
||||
}
|
||||
else if (dashRequired)
|
||||
@ -76,7 +76,7 @@ namespace osu.Game.Rulesets.Catch.Replays
|
||||
float midPosition = (float)Interpolation.Lerp(lastPosition, h.X, (float)timeAtDashSpeed / timeAvailable);
|
||||
|
||||
//dash movement
|
||||
Replay.Frames.Add(new CatchReplayFrame(h.StartTime - timeAvailable + 1, lastPosition, ReplayButtonState.Left1));
|
||||
Replay.Frames.Add(new CatchReplayFrame(h.StartTime - timeAvailable + 1, lastPosition, true));
|
||||
Replay.Frames.Add(new CatchReplayFrame(h.StartTime - timeAvailable + timeAtDashSpeed, midPosition));
|
||||
Replay.Frames.Add(new CatchReplayFrame(h.StartTime, h.X));
|
||||
}
|
||||
@ -84,7 +84,7 @@ namespace osu.Game.Rulesets.Catch.Replays
|
||||
{
|
||||
double timeBefore = positionChange / movement_speed;
|
||||
|
||||
Replay.Frames.Add(new CatchReplayFrame(h.StartTime - timeBefore, lastPosition, ReplayButtonState.Right1));
|
||||
Replay.Frames.Add(new CatchReplayFrame(h.StartTime - timeBefore, lastPosition));
|
||||
Replay.Frames.Add(new CatchReplayFrame(h.StartTime, h.X));
|
||||
}
|
||||
|
||||
|
@ -3,37 +3,51 @@
|
||||
|
||||
using System.Collections.Generic;
|
||||
using osu.Framework.Input;
|
||||
using osu.Framework.MathUtils;
|
||||
using osu.Game.Rulesets.Replays;
|
||||
|
||||
namespace osu.Game.Rulesets.Catch.Replays
|
||||
{
|
||||
public class CatchFramedReplayInputHandler : FramedReplayInputHandler
|
||||
public class CatchFramedReplayInputHandler : FramedReplayInputHandler<CatchReplayFrame>
|
||||
{
|
||||
public CatchFramedReplayInputHandler(Replay replay)
|
||||
: base(replay)
|
||||
{
|
||||
}
|
||||
|
||||
protected override bool IsImportant(CatchReplayFrame frame) => frame.Position > 0;
|
||||
|
||||
protected float? Position
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!HasFrames)
|
||||
return null;
|
||||
|
||||
return Interpolation.ValueAt(CurrentTime, CurrentFrame.Position, NextFrame.Position, CurrentFrame.Time, NextFrame.Time);
|
||||
}
|
||||
}
|
||||
|
||||
public override List<InputState> GetPendingStates()
|
||||
{
|
||||
if (!Position.HasValue) return new List<InputState>();
|
||||
|
||||
var action = new List<CatchAction>();
|
||||
var actions = new List<CatchAction>();
|
||||
|
||||
if (CurrentFrame.ButtonState == ReplayButtonState.Left1)
|
||||
action.Add(CatchAction.Dash);
|
||||
if (CurrentFrame.Dashing)
|
||||
actions.Add(CatchAction.Dash);
|
||||
|
||||
if (Position.Value.X > CurrentFrame.Position.X)
|
||||
action.Add(CatchAction.MoveRight);
|
||||
else if (Position.Value.X < CurrentFrame.Position.X)
|
||||
action.Add(CatchAction.MoveLeft);
|
||||
if (Position.Value > CurrentFrame.Position)
|
||||
actions.Add(CatchAction.MoveRight);
|
||||
else if (Position.Value < CurrentFrame.Position)
|
||||
actions.Add(CatchAction.MoveLeft);
|
||||
|
||||
return new List<InputState>
|
||||
{
|
||||
new CatchReplayState
|
||||
{
|
||||
PressedActions = action,
|
||||
CatcherX = Position.Value.X
|
||||
PressedActions = actions,
|
||||
CatcherX = Position.Value
|
||||
},
|
||||
};
|
||||
}
|
||||
|
@ -1,17 +1,34 @@
|
||||
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Rulesets.Catch.UI;
|
||||
using osu.Game.Rulesets.Replays;
|
||||
using osu.Game.Rulesets.Replays.Legacy;
|
||||
using osu.Game.Rulesets.Replays.Types;
|
||||
|
||||
namespace osu.Game.Rulesets.Catch.Replays
|
||||
{
|
||||
public class CatchReplayFrame : ReplayFrame
|
||||
public class CatchReplayFrame : ReplayFrame, IConvertibleReplayFrame
|
||||
{
|
||||
public override bool IsImportant => MouseX > 0;
|
||||
public float Position;
|
||||
public bool Dashing;
|
||||
|
||||
public CatchReplayFrame(double time, float? x = null, ReplayButtonState button = ReplayButtonState.None)
|
||||
: base(time, x ?? -1, null, button)
|
||||
public CatchReplayFrame()
|
||||
{
|
||||
}
|
||||
|
||||
public CatchReplayFrame(double time, float? position = null, bool dashing = false)
|
||||
: base(time)
|
||||
{
|
||||
Position = position ?? -1;
|
||||
Dashing = dashing;
|
||||
}
|
||||
|
||||
public void ConvertFrom(LegacyReplayFrame legacyFrame, Beatmap beatmap)
|
||||
{
|
||||
Position = legacyFrame.Position.X / CatchPlayfield.BASE_WIDTH;
|
||||
Dashing = legacyFrame.ButtonState == ReplayButtonState.Left1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,957 @@
|
||||
{
|
||||
"Mappings": [{
|
||||
"StartTime": 500.0,
|
||||
"Objects": [{
|
||||
"StartTime": 500.0,
|
||||
"Position": 96.0
|
||||
}, {
|
||||
"StartTime": 562.0,
|
||||
"Position": 100.84
|
||||
}, {
|
||||
"StartTime": 625.0,
|
||||
"Position": 125.0
|
||||
}, {
|
||||
"StartTime": 687.0,
|
||||
"Position": 152.84
|
||||
}, {
|
||||
"StartTime": 750.0,
|
||||
"Position": 191.0
|
||||
}, {
|
||||
"StartTime": 812.0,
|
||||
"Position": 212.84
|
||||
}, {
|
||||
"StartTime": 875.0,
|
||||
"Position": 217.0
|
||||
}, {
|
||||
"StartTime": 937.0,
|
||||
"Position": 234.84
|
||||
}, {
|
||||
"StartTime": 1000.0,
|
||||
"Position": 256.0
|
||||
}, {
|
||||
"StartTime": 1062.0,
|
||||
"Position": 267.84
|
||||
}, {
|
||||
"StartTime": 1125.0,
|
||||
"Position": 284.0
|
||||
}, {
|
||||
"StartTime": 1187.0,
|
||||
"Position": 311.84
|
||||
}, {
|
||||
"StartTime": 1250.0,
|
||||
"Position": 350.0
|
||||
}, {
|
||||
"StartTime": 1312.0,
|
||||
"Position": 359.84
|
||||
}, {
|
||||
"StartTime": 1375.0,
|
||||
"Position": 367.0
|
||||
}, {
|
||||
"StartTime": 1437.0,
|
||||
"Position": 400.84
|
||||
}, {
|
||||
"StartTime": 1500.0,
|
||||
"Position": 416.0
|
||||
}, {
|
||||
"StartTime": 1562.0,
|
||||
"Position": 377.159973
|
||||
}, {
|
||||
"StartTime": 1625.0,
|
||||
"Position": 367.0
|
||||
}, {
|
||||
"StartTime": 1687.0,
|
||||
"Position": 374.159973
|
||||
}, {
|
||||
"StartTime": 1750.0,
|
||||
"Position": 353.0
|
||||
}, {
|
||||
"StartTime": 1812.0,
|
||||
"Position": 329.159973
|
||||
}, {
|
||||
"StartTime": 1875.0,
|
||||
"Position": 288.0
|
||||
}, {
|
||||
"StartTime": 1937.0,
|
||||
"Position": 259.159973
|
||||
}, {
|
||||
"StartTime": 2000.0,
|
||||
"Position": 256.0
|
||||
}, {
|
||||
"StartTime": 2058.0,
|
||||
"Position": 232.44
|
||||
}, {
|
||||
"StartTime": 2116.0,
|
||||
"Position": 222.879974
|
||||
}, {
|
||||
"StartTime": 2174.0,
|
||||
"Position": 185.319992
|
||||
}, {
|
||||
"StartTime": 2232.0,
|
||||
"Position": 177.76001
|
||||
}, {
|
||||
"StartTime": 2290.0,
|
||||
"Position": 162.200012
|
||||
}, {
|
||||
"StartTime": 2348.0,
|
||||
"Position": 158.639984
|
||||
}, {
|
||||
"StartTime": 2406.0,
|
||||
"Position": 111.079994
|
||||
}, {
|
||||
"StartTime": 2500.0,
|
||||
"Position": 96.0
|
||||
}]
|
||||
}, {
|
||||
"StartTime": 3000.0,
|
||||
"Objects": [{
|
||||
"StartTime": 3000.0,
|
||||
"Position": 18.0
|
||||
}, {
|
||||
"StartTime": 3062.0,
|
||||
"Position": 482.0
|
||||
}, {
|
||||
"StartTime": 3125.0,
|
||||
"Position": 243.0
|
||||
}, {
|
||||
"StartTime": 3187.0,
|
||||
"Position": 332.0
|
||||
}, {
|
||||
"StartTime": 3250.0,
|
||||
"Position": 477.0
|
||||
}, {
|
||||
"StartTime": 3312.0,
|
||||
"Position": 376.0
|
||||
}, {
|
||||
"StartTime": 3375.0,
|
||||
"Position": 104.0
|
||||
}, {
|
||||
"StartTime": 3437.0,
|
||||
"Position": 156.0
|
||||
}, {
|
||||
"StartTime": 3500.0,
|
||||
"Position": 135.0
|
||||
}, {
|
||||
"StartTime": 3562.0,
|
||||
"Position": 256.0
|
||||
}, {
|
||||
"StartTime": 3625.0,
|
||||
"Position": 360.0
|
||||
}, {
|
||||
"StartTime": 3687.0,
|
||||
"Position": 199.0
|
||||
}, {
|
||||
"StartTime": 3750.0,
|
||||
"Position": 239.0
|
||||
}, {
|
||||
"StartTime": 3812.0,
|
||||
"Position": 326.0
|
||||
}, {
|
||||
"StartTime": 3875.0,
|
||||
"Position": 393.0
|
||||
}, {
|
||||
"StartTime": 3937.0,
|
||||
"Position": 470.0
|
||||
}, {
|
||||
"StartTime": 4000.0,
|
||||
"Position": 136.0
|
||||
}]
|
||||
}, {
|
||||
"StartTime": 4500.0,
|
||||
"Objects": [{
|
||||
"StartTime": 4500.0,
|
||||
"Position": 317.0
|
||||
}, {
|
||||
"StartTime": 4562.0,
|
||||
"Position": 354.0
|
||||
}, {
|
||||
"StartTime": 4625.0,
|
||||
"Position": 414.0
|
||||
}, {
|
||||
"StartTime": 4687.0,
|
||||
"Position": 39.0
|
||||
}, {
|
||||
"StartTime": 4750.0,
|
||||
"Position": 172.0
|
||||
}, {
|
||||
"StartTime": 4812.0,
|
||||
"Position": 479.0
|
||||
}, {
|
||||
"StartTime": 4875.0,
|
||||
"Position": 18.0
|
||||
}, {
|
||||
"StartTime": 4937.0,
|
||||
"Position": 151.0
|
||||
}, {
|
||||
"StartTime": 5000.0,
|
||||
"Position": 342.0
|
||||
}, {
|
||||
"StartTime": 5062.0,
|
||||
"Position": 400.0
|
||||
}, {
|
||||
"StartTime": 5125.0,
|
||||
"Position": 420.0
|
||||
}, {
|
||||
"StartTime": 5187.0,
|
||||
"Position": 90.0
|
||||
}, {
|
||||
"StartTime": 5250.0,
|
||||
"Position": 220.0
|
||||
}, {
|
||||
"StartTime": 5312.0,
|
||||
"Position": 80.0
|
||||
}, {
|
||||
"StartTime": 5375.0,
|
||||
"Position": 421.0
|
||||
}, {
|
||||
"StartTime": 5437.0,
|
||||
"Position": 473.0
|
||||
}, {
|
||||
"StartTime": 5500.0,
|
||||
"Position": 97.0
|
||||
}]
|
||||
}, {
|
||||
"StartTime": 6000.0,
|
||||
"Objects": [{
|
||||
"StartTime": 6000.0,
|
||||
"Position": 105.0
|
||||
}, {
|
||||
"StartTime": 6062.0,
|
||||
"Position": 249.0
|
||||
}, {
|
||||
"StartTime": 6125.0,
|
||||
"Position": 163.0
|
||||
}, {
|
||||
"StartTime": 6187.0,
|
||||
"Position": 194.0
|
||||
}, {
|
||||
"StartTime": 6250.0,
|
||||
"Position": 106.0
|
||||
}, {
|
||||
"StartTime": 6312.0,
|
||||
"Position": 212.0
|
||||
}, {
|
||||
"StartTime": 6375.0,
|
||||
"Position": 257.0
|
||||
}, {
|
||||
"StartTime": 6437.0,
|
||||
"Position": 461.0
|
||||
}, {
|
||||
"StartTime": 6500.0,
|
||||
"Position": 79.0
|
||||
}]
|
||||
}, {
|
||||
"StartTime": 7000.0,
|
||||
"Objects": [{
|
||||
"StartTime": 7000.0,
|
||||
"Position": 256.0
|
||||
}, {
|
||||
"StartTime": 7062.0,
|
||||
"Position": 294.84
|
||||
}, {
|
||||
"StartTime": 7125.0,
|
||||
"Position": 279.0
|
||||
}, {
|
||||
"StartTime": 7187.0,
|
||||
"Position": 309.84
|
||||
}, {
|
||||
"StartTime": 7250.0,
|
||||
"Position": 336.0
|
||||
}, {
|
||||
"StartTime": 7312.0,
|
||||
"Position": 322.16
|
||||
}, {
|
||||
"StartTime": 7375.0,
|
||||
"Position": 308.0
|
||||
}, {
|
||||
"StartTime": 7437.0,
|
||||
"Position": 263.16
|
||||
}, {
|
||||
"StartTime": 7500.0,
|
||||
"Position": 256.0
|
||||
}, {
|
||||
"StartTime": 7562.0,
|
||||
"Position": 261.84
|
||||
}, {
|
||||
"StartTime": 7625.0,
|
||||
"Position": 277.0
|
||||
}, {
|
||||
"StartTime": 7687.0,
|
||||
"Position": 318.84
|
||||
}, {
|
||||
"StartTime": 7750.0,
|
||||
"Position": 336.0
|
||||
}, {
|
||||
"StartTime": 7803.0,
|
||||
"Position": 305.04
|
||||
}, {
|
||||
"StartTime": 7857.0,
|
||||
"Position": 307.76
|
||||
}, {
|
||||
"StartTime": 7910.0,
|
||||
"Position": 297.8
|
||||
}, {
|
||||
"StartTime": 8000.0,
|
||||
"Position": 256.0
|
||||
}]
|
||||
}, {
|
||||
"StartTime": 8500.0,
|
||||
"Objects": [{
|
||||
"StartTime": 8500.0,
|
||||
"Position": 32.0
|
||||
}, {
|
||||
"StartTime": 8562.0,
|
||||
"Position": 22.8515015
|
||||
}, {
|
||||
"StartTime": 8625.0,
|
||||
"Position": 28.5659637
|
||||
}, {
|
||||
"StartTime": 8687.0,
|
||||
"Position": 50.3433228
|
||||
}, {
|
||||
"StartTime": 8750.0,
|
||||
"Position": 56.58974
|
||||
}, {
|
||||
"StartTime": 8812.0,
|
||||
"Position": 64.23422
|
||||
}, {
|
||||
"StartTime": 8875.0,
|
||||
"Position": 67.7117844
|
||||
}, {
|
||||
"StartTime": 8937.0,
|
||||
"Position": 90.52607
|
||||
}, {
|
||||
"StartTime": 9000.0,
|
||||
"Position": 101.81015
|
||||
}, {
|
||||
"StartTime": 9062.0,
|
||||
"Position": 113.478188
|
||||
}, {
|
||||
"StartTime": 9125.0,
|
||||
"Position": 159.414444
|
||||
}, {
|
||||
"StartTime": 9187.0,
|
||||
"Position": 155.1861
|
||||
}, {
|
||||
"StartTime": 9250.0,
|
||||
"Position": 179.600418
|
||||
}, {
|
||||
"StartTime": 9312.0,
|
||||
"Position": 212.293015
|
||||
}, {
|
||||
"StartTime": 9375.0,
|
||||
"Position": 197.2076
|
||||
}, {
|
||||
"StartTime": 9437.0,
|
||||
"Position": 243.438324
|
||||
}, {
|
||||
"StartTime": 9500.0,
|
||||
"Position": 237.2304
|
||||
}, {
|
||||
"StartTime": 9562.0,
|
||||
"Position": 241.253983
|
||||
}, {
|
||||
"StartTime": 9625.0,
|
||||
"Position": 258.950623
|
||||
}, {
|
||||
"StartTime": 9687.0,
|
||||
"Position": 253.3786
|
||||
}, {
|
||||
"StartTime": 9750.0,
|
||||
"Position": 270.8865
|
||||
}, {
|
||||
"StartTime": 9812.0,
|
||||
"Position": 244.38974
|
||||
}, {
|
||||
"StartTime": 9875.0,
|
||||
"Position": 242.701874
|
||||
}, {
|
||||
"StartTime": 9937.0,
|
||||
"Position": 256.2331
|
||||
}, {
|
||||
"StartTime": 10000.0,
|
||||
"Position": 270.339874
|
||||
}, {
|
||||
"StartTime": 10062.0,
|
||||
"Position": 275.9349
|
||||
}, {
|
||||
"StartTime": 10125.0,
|
||||
"Position": 297.2969
|
||||
}, {
|
||||
"StartTime": 10187.0,
|
||||
"Position": 307.834137
|
||||
}, {
|
||||
"StartTime": 10250.0,
|
||||
"Position": 321.6449
|
||||
}, {
|
||||
"StartTime": 10312.0,
|
||||
"Position": 357.746338
|
||||
}, {
|
||||
"StartTime": 10375.0,
|
||||
"Position": 358.21875
|
||||
}, {
|
||||
"StartTime": 10437.0,
|
||||
"Position": 394.943
|
||||
}, {
|
||||
"StartTime": 10500.0,
|
||||
"Position": 401.0588
|
||||
}, {
|
||||
"StartTime": 10558.0,
|
||||
"Position": 418.21347
|
||||
}, {
|
||||
"StartTime": 10616.0,
|
||||
"Position": 424.6034
|
||||
}, {
|
||||
"StartTime": 10674.0,
|
||||
"Position": 455.835754
|
||||
}, {
|
||||
"StartTime": 10732.0,
|
||||
"Position": 477.5042
|
||||
}, {
|
||||
"StartTime": 10790.0,
|
||||
"Position": 476.290955
|
||||
}, {
|
||||
"StartTime": 10848.0,
|
||||
"Position": 470.943237
|
||||
}, {
|
||||
"StartTime": 10906.0,
|
||||
"Position": 503.3372
|
||||
}, {
|
||||
"StartTime": 10999.0,
|
||||
"Position": 508.166229
|
||||
}]
|
||||
}, {
|
||||
"StartTime": 11500.0,
|
||||
"Objects": [{
|
||||
"StartTime": 11500.0,
|
||||
"Position": 321.0
|
||||
}, {
|
||||
"StartTime": 11562.0,
|
||||
"Position": 17.0
|
||||
}, {
|
||||
"StartTime": 11625.0,
|
||||
"Position": 173.0
|
||||
}, {
|
||||
"StartTime": 11687.0,
|
||||
"Position": 170.0
|
||||
}, {
|
||||
"StartTime": 11750.0,
|
||||
"Position": 447.0
|
||||
}, {
|
||||
"StartTime": 11812.0,
|
||||
"Position": 218.0
|
||||
}, {
|
||||
"StartTime": 11875.0,
|
||||
"Position": 394.0
|
||||
}, {
|
||||
"StartTime": 11937.0,
|
||||
"Position": 46.0
|
||||
}, {
|
||||
"StartTime": 12000.0,
|
||||
"Position": 480.0
|
||||
}]
|
||||
}, {
|
||||
"StartTime": 12500.0,
|
||||
"Objects": [{
|
||||
"StartTime": 12500.0,
|
||||
"Position": 512.0
|
||||
}, {
|
||||
"StartTime": 12562.0,
|
||||
"Position": 491.3132
|
||||
}, {
|
||||
"StartTime": 12625.0,
|
||||
"Position": 484.3089
|
||||
}, {
|
||||
"StartTime": 12687.0,
|
||||
"Position": 454.6221
|
||||
}, {
|
||||
"StartTime": 12750.0,
|
||||
"Position": 433.617767
|
||||
}, {
|
||||
"StartTime": 12812.0,
|
||||
"Position": 399.930969
|
||||
}, {
|
||||
"StartTime": 12875.0,
|
||||
"Position": 395.926666
|
||||
}, {
|
||||
"StartTime": 12937.0,
|
||||
"Position": 361.239868
|
||||
}, {
|
||||
"StartTime": 13000.0,
|
||||
"Position": 353.235535
|
||||
}, {
|
||||
"StartTime": 13062.0,
|
||||
"Position": 314.548767
|
||||
}, {
|
||||
"StartTime": 13125.0,
|
||||
"Position": 315.544434
|
||||
}, {
|
||||
"StartTime": 13187.0,
|
||||
"Position": 288.857635
|
||||
}, {
|
||||
"StartTime": 13250.0,
|
||||
"Position": 254.853333
|
||||
}, {
|
||||
"StartTime": 13312.0,
|
||||
"Position": 239.166534
|
||||
}, {
|
||||
"StartTime": 13375.0,
|
||||
"Position": 240.1622
|
||||
}, {
|
||||
"StartTime": 13437.0,
|
||||
"Position": 212.4754
|
||||
}, {
|
||||
"StartTime": 13500.0,
|
||||
"Position": 194.471069
|
||||
}, {
|
||||
"StartTime": 13562.0,
|
||||
"Position": 161.784271
|
||||
}, {
|
||||
"StartTime": 13625.0,
|
||||
"Position": 145.779968
|
||||
}, {
|
||||
"StartTime": 13687.0,
|
||||
"Position": 129.09314
|
||||
}, {
|
||||
"StartTime": 13750.0,
|
||||
"Position": 104.088837
|
||||
}, {
|
||||
"StartTime": 13812.0,
|
||||
"Position": 95.40204
|
||||
}, {
|
||||
"StartTime": 13875.0,
|
||||
"Position": 61.3977356
|
||||
}, {
|
||||
"StartTime": 13937.0,
|
||||
"Position": 56.710907
|
||||
}, {
|
||||
"StartTime": 14000.0,
|
||||
"Position": 35.7066345
|
||||
}, {
|
||||
"StartTime": 14062.0,
|
||||
"Position": 5.019806
|
||||
}, {
|
||||
"StartTime": 14125.0,
|
||||
"Position": 0.0
|
||||
}, {
|
||||
"StartTime": 14187.0,
|
||||
"Position": 39.7696266
|
||||
}, {
|
||||
"StartTime": 14250.0,
|
||||
"Position": 23.0119171
|
||||
}, {
|
||||
"StartTime": 14312.0,
|
||||
"Position": 75.94882
|
||||
}, {
|
||||
"StartTime": 14375.0,
|
||||
"Position": 98.19112
|
||||
}, {
|
||||
"StartTime": 14437.0,
|
||||
"Position": 82.12803
|
||||
}, {
|
||||
"StartTime": 14500.0,
|
||||
"Position": 118.370323
|
||||
}, {
|
||||
"StartTime": 14562.0,
|
||||
"Position": 149.307236
|
||||
}, {
|
||||
"StartTime": 14625.0,
|
||||
"Position": 168.549515
|
||||
}, {
|
||||
"StartTime": 14687.0,
|
||||
"Position": 190.486435
|
||||
}, {
|
||||
"StartTime": 14750.0,
|
||||
"Position": 186.728714
|
||||
}, {
|
||||
"StartTime": 14812.0,
|
||||
"Position": 199.665634
|
||||
}, {
|
||||
"StartTime": 14875.0,
|
||||
"Position": 228.907928
|
||||
}, {
|
||||
"StartTime": 14937.0,
|
||||
"Position": 264.844849
|
||||
}, {
|
||||
"StartTime": 15000.0,
|
||||
"Position": 271.087128
|
||||
}, {
|
||||
"StartTime": 15062.0,
|
||||
"Position": 290.024017
|
||||
}, {
|
||||
"StartTime": 15125.0,
|
||||
"Position": 302.266327
|
||||
}, {
|
||||
"StartTime": 15187.0,
|
||||
"Position": 344.203247
|
||||
}, {
|
||||
"StartTime": 15250.0,
|
||||
"Position": 356.445526
|
||||
}, {
|
||||
"StartTime": 15312.0,
|
||||
"Position": 359.382446
|
||||
}, {
|
||||
"StartTime": 15375.0,
|
||||
"Position": 401.624725
|
||||
}, {
|
||||
"StartTime": 15437.0,
|
||||
"Position": 388.561646
|
||||
}, {
|
||||
"StartTime": 15500.0,
|
||||
"Position": 423.803925
|
||||
}, {
|
||||
"StartTime": 15562.0,
|
||||
"Position": 425.740845
|
||||
}, {
|
||||
"StartTime": 15625.0,
|
||||
"Position": 449.983124
|
||||
}, {
|
||||
"StartTime": 15687.0,
|
||||
"Position": 468.920044
|
||||
}, {
|
||||
"StartTime": 15750.0,
|
||||
"Position": 492.162323
|
||||
}, {
|
||||
"StartTime": 15812.0,
|
||||
"Position": 506.784332
|
||||
}, {
|
||||
"StartTime": 15875.0,
|
||||
"Position": 474.226227
|
||||
}, {
|
||||
"StartTime": 15937.0,
|
||||
"Position": 482.978638
|
||||
}, {
|
||||
"StartTime": 16000.0,
|
||||
"Position": 446.420532
|
||||
}, {
|
||||
"StartTime": 16058.0,
|
||||
"Position": 418.4146
|
||||
}, {
|
||||
"StartTime": 16116.0,
|
||||
"Position": 425.408844
|
||||
}, {
|
||||
"StartTime": 16174.0,
|
||||
"Position": 383.402924
|
||||
}, {
|
||||
"StartTime": 16232.0,
|
||||
"Position": 363.397156
|
||||
}, {
|
||||
"StartTime": 16290.0,
|
||||
"Position": 343.391235
|
||||
}, {
|
||||
"StartTime": 16348.0,
|
||||
"Position": 328.385468
|
||||
}, {
|
||||
"StartTime": 16406.0,
|
||||
"Position": 322.3797
|
||||
}, {
|
||||
"StartTime": 16500.0,
|
||||
"Position": 291.1977
|
||||
}]
|
||||
}, {
|
||||
"StartTime": 17000.0,
|
||||
"Objects": [{
|
||||
"StartTime": 17000.0,
|
||||
"Position": 256.0
|
||||
}, {
|
||||
"StartTime": 17062.0,
|
||||
"Position": 228.16
|
||||
}, {
|
||||
"StartTime": 17125.0,
|
||||
"Position": 234.0
|
||||
}, {
|
||||
"StartTime": 17187.0,
|
||||
"Position": 202.16
|
||||
}, {
|
||||
"StartTime": 17250.0,
|
||||
"Position": 176.0
|
||||
}, {
|
||||
"StartTime": 17312.0,
|
||||
"Position": 210.84
|
||||
}, {
|
||||
"StartTime": 17375.0,
|
||||
"Position": 221.0
|
||||
}, {
|
||||
"StartTime": 17437.0,
|
||||
"Position": 219.84
|
||||
}, {
|
||||
"StartTime": 17500.0,
|
||||
"Position": 256.0
|
||||
}, {
|
||||
"StartTime": 17562.0,
|
||||
"Position": 219.16
|
||||
}, {
|
||||
"StartTime": 17625.0,
|
||||
"Position": 228.0
|
||||
}, {
|
||||
"StartTime": 17687.0,
|
||||
"Position": 203.16
|
||||
}, {
|
||||
"StartTime": 17750.0,
|
||||
"Position": 176.0
|
||||
}, {
|
||||
"StartTime": 17803.0,
|
||||
"Position": 174.959991
|
||||
}, {
|
||||
"StartTime": 17857.0,
|
||||
"Position": 214.23999
|
||||
}, {
|
||||
"StartTime": 17910.0,
|
||||
"Position": 228.200012
|
||||
}, {
|
||||
"StartTime": 18000.0,
|
||||
"Position": 256.0
|
||||
}]
|
||||
}, {
|
||||
"StartTime": 18500.0,
|
||||
"Objects": [{
|
||||
"StartTime": 18500.0,
|
||||
"Position": 362.0
|
||||
}, {
|
||||
"StartTime": 18559.0,
|
||||
"Position": 249.0
|
||||
}, {
|
||||
"StartTime": 18618.0,
|
||||
"Position": 357.0
|
||||
}, {
|
||||
"StartTime": 18678.0,
|
||||
"Position": 167.0
|
||||
}, {
|
||||
"StartTime": 18737.0,
|
||||
"Position": 477.0
|
||||
}, {
|
||||
"StartTime": 18796.0,
|
||||
"Position": 411.0
|
||||
}, {
|
||||
"StartTime": 18856.0,
|
||||
"Position": 254.0
|
||||
}, {
|
||||
"StartTime": 18915.0,
|
||||
"Position": 308.0
|
||||
}, {
|
||||
"StartTime": 18975.0,
|
||||
"Position": 399.0
|
||||
}, {
|
||||
"StartTime": 19034.0,
|
||||
"Position": 176.0
|
||||
}, {
|
||||
"StartTime": 19093.0,
|
||||
"Position": 14.0
|
||||
}, {
|
||||
"StartTime": 19153.0,
|
||||
"Position": 258.0
|
||||
}, {
|
||||
"StartTime": 19212.0,
|
||||
"Position": 221.0
|
||||
}, {
|
||||
"StartTime": 19271.0,
|
||||
"Position": 481.0
|
||||
}, {
|
||||
"StartTime": 19331.0,
|
||||
"Position": 92.0
|
||||
}, {
|
||||
"StartTime": 19390.0,
|
||||
"Position": 211.0
|
||||
}, {
|
||||
"StartTime": 19450.0,
|
||||
"Position": 135.0
|
||||
}]
|
||||
}, {
|
||||
"StartTime": 19875.0,
|
||||
"Objects": [{
|
||||
"StartTime": 19875.0,
|
||||
"Position": 216.0
|
||||
}, {
|
||||
"StartTime": 19937.0,
|
||||
"Position": 215.307053
|
||||
}, {
|
||||
"StartTime": 20000.0,
|
||||
"Position": 236.036865
|
||||
}, {
|
||||
"StartTime": 20062.0,
|
||||
"Position": 236.312088
|
||||
}, {
|
||||
"StartTime": 20125.0,
|
||||
"Position": 235.838928
|
||||
}, {
|
||||
"StartTime": 20187.0,
|
||||
"Position": 269.9743
|
||||
}, {
|
||||
"StartTime": 20250.0,
|
||||
"Position": 285.999146
|
||||
}, {
|
||||
"StartTime": 20312.0,
|
||||
"Position": 283.669067
|
||||
}, {
|
||||
"StartTime": 20375.0,
|
||||
"Position": 317.446747
|
||||
}, {
|
||||
"StartTime": 20437.0,
|
||||
"Position": 330.750275
|
||||
}, {
|
||||
"StartTime": 20500.0,
|
||||
"Position": 344.0156
|
||||
}, {
|
||||
"StartTime": 20562.0,
|
||||
"Position": 318.472168
|
||||
}, {
|
||||
"StartTime": 20625.0,
|
||||
"Position": 309.165466
|
||||
}, {
|
||||
"StartTime": 20687.0,
|
||||
"Position": 317.044617
|
||||
}, {
|
||||
"StartTime": 20750.0,
|
||||
"Position": 280.457367
|
||||
}, {
|
||||
"StartTime": 20812.0,
|
||||
"Position": 272.220581
|
||||
}, {
|
||||
"StartTime": 20875.0,
|
||||
"Position": 270.3294
|
||||
}, {
|
||||
"StartTime": 20937.0,
|
||||
"Position": 262.57605
|
||||
}, {
|
||||
"StartTime": 21000.0,
|
||||
"Position": 244.803329
|
||||
}, {
|
||||
"StartTime": 21062.0,
|
||||
"Position": 215.958359
|
||||
}, {
|
||||
"StartTime": 21125.0,
|
||||
"Position": 177.79332
|
||||
}, {
|
||||
"StartTime": 21187.0,
|
||||
"Position": 190.948349
|
||||
}, {
|
||||
"StartTime": 21250.0,
|
||||
"Position": 158.78334
|
||||
}, {
|
||||
"StartTime": 21312.0,
|
||||
"Position": 136.93837
|
||||
}, {
|
||||
"StartTime": 21375.0,
|
||||
"Position": 119.121056
|
||||
}, {
|
||||
"StartTime": 21437.0,
|
||||
"Position": 132.387573
|
||||
}, {
|
||||
"StartTime": 21500.0,
|
||||
"Position": 124.503014
|
||||
}, {
|
||||
"StartTime": 21562.0,
|
||||
"Position": 118.749374
|
||||
}, {
|
||||
"StartTime": 21625.0,
|
||||
"Position": 123.165535
|
||||
}, {
|
||||
"StartTime": 21687.0,
|
||||
"Position": 96.02999
|
||||
}, {
|
||||
"StartTime": 21750.0,
|
||||
"Position": 118.547928
|
||||
}, {
|
||||
"StartTime": 21812.0,
|
||||
"Position": 128.856232
|
||||
}, {
|
||||
"StartTime": 21875.0,
|
||||
"Position": 124.28746
|
||||
}, {
|
||||
"StartTime": 21937.0,
|
||||
"Position": 150.754929
|
||||
}, {
|
||||
"StartTime": 22000.0,
|
||||
"Position": 149.528732
|
||||
}, {
|
||||
"StartTime": 22062.0,
|
||||
"Position": 145.1691
|
||||
}, {
|
||||
"StartTime": 22125.0,
|
||||
"Position": 182.802155
|
||||
}, {
|
||||
"StartTime": 22187.0,
|
||||
"Position": 178.6452
|
||||
}, {
|
||||
"StartTime": 22250.0,
|
||||
"Position": 213.892181
|
||||
}, {
|
||||
"StartTime": 22312.0,
|
||||
"Position": 218.713028
|
||||
}, {
|
||||
"StartTime": 22375.0,
|
||||
"Position": 240.4715
|
||||
}, {
|
||||
"StartTime": 22437.0,
|
||||
"Position": 239.371887
|
||||
}, {
|
||||
"StartTime": 22500.0,
|
||||
"Position": 261.907257
|
||||
}, {
|
||||
"StartTime": 22562.0,
|
||||
"Position": 314.353119
|
||||
}, {
|
||||
"StartTime": 22625.0,
|
||||
"Position": 299.273376
|
||||
}, {
|
||||
"StartTime": 22687.0,
|
||||
"Position": 356.98288
|
||||
}, {
|
||||
"StartTime": 22750.0,
|
||||
"Position": 339.078552
|
||||
}, {
|
||||
"StartTime": 22812.0,
|
||||
"Position": 377.8958
|
||||
}, {
|
||||
"StartTime": 22875.0,
|
||||
"Position": 398.054047
|
||||
}, {
|
||||
"StartTime": 22937.0,
|
||||
"Position": 398.739441
|
||||
}, {
|
||||
"StartTime": 23000.0,
|
||||
"Position": 407.178467
|
||||
}, {
|
||||
"StartTime": 23062.0,
|
||||
"Position": 444.8687
|
||||
}, {
|
||||
"StartTime": 23125.0,
|
||||
"Position": 417.069977
|
||||
}, {
|
||||
"StartTime": 23187.0,
|
||||
"Position": 454.688477
|
||||
}, {
|
||||
"StartTime": 23250.0,
|
||||
"Position": 428.9612
|
||||
}, {
|
||||
"StartTime": 23312.0,
|
||||
"Position": 441.92807
|
||||
}, {
|
||||
"StartTime": 23375.0,
|
||||
"Position": 439.749878
|
||||
}, {
|
||||
"StartTime": 23433.0,
|
||||
"Position": 455.644684
|
||||
}, {
|
||||
"StartTime": 23491.0,
|
||||
"Position": 440.7359
|
||||
}, {
|
||||
"StartTime": 23549.0,
|
||||
"Position": 430.0944
|
||||
}, {
|
||||
"StartTime": 23607.0,
|
||||
"Position": 420.796173
|
||||
}, {
|
||||
"StartTime": 23665.0,
|
||||
"Position": 435.897461
|
||||
}, {
|
||||
"StartTime": 23723.0,
|
||||
"Position": 418.462555
|
||||
}, {
|
||||
"StartTime": 23781.0,
|
||||
"Position": 405.53775
|
||||
}, {
|
||||
"StartTime": 23874.0,
|
||||
"Position": 408.720825
|
||||
}]
|
||||
}]
|
||||
}
|
27
osu.Game.Rulesets.Catch/Resources/Testing/Beatmaps/basic.osu
Normal file
27
osu.Game.Rulesets.Catch/Resources/Testing/Beatmaps/basic.osu
Normal file
@ -0,0 +1,27 @@
|
||||
osu file format v14
|
||||
|
||||
[Difficulty]
|
||||
HPDrainRate:6
|
||||
CircleSize:4
|
||||
OverallDifficulty:7
|
||||
ApproachRate:8.3
|
||||
SliderMultiplier:1.6
|
||||
SliderTickRate:1
|
||||
|
||||
[TimingPoints]
|
||||
500,500,4,2,1,50,1,0
|
||||
13426,-100,4,3,1,45,0,0
|
||||
14884,-100,4,2,1,50,0,0
|
||||
|
||||
[HitObjects]
|
||||
96,192,500,6,0,L|416:192,2,320
|
||||
256,192,3000,12,0,4000,0:0:0:0:
|
||||
256,192,4500,12,0,5500,0:0:0:0:
|
||||
256,192,6000,12,0,6500,0:0:0:0:
|
||||
256,128,7000,6,0,L|352:128,4,80
|
||||
32,192,8500,6,0,B|32:384|256:384|256:192|256:192|256:0|512:0|512:192,1,800
|
||||
256,192,11500,12,0,12000,0:0:0:0:
|
||||
512,320,12500,6,0,B|0:256|0:256|512:96|512:96|256:32,1,1280
|
||||
256,256,17000,6,0,L|160:256,4,80
|
||||
256,192,18500,12,0,19450,0:0:0:0:
|
||||
216,231,19875,6,0,B|216:135|280:135|344:135|344:199|344:263|248:327|248:327|120:327|120:327|56:39|408:39|408:39|472:150|408:342,1,1280
|
67
osu.Game.Rulesets.Catch/Tests/CatchBeatmapConversionTest.cs
Normal file
67
osu.Game.Rulesets.Catch/Tests/CatchBeatmapConversionTest.cs
Normal file
@ -0,0 +1,67 @@
|
||||
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using NUnit.Framework;
|
||||
using osu.Framework.MathUtils;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Rulesets.Catch.Beatmaps;
|
||||
using osu.Game.Rulesets.Catch.Objects;
|
||||
using osu.Game.Rulesets.Catch.UI;
|
||||
using osu.Game.Rulesets.Objects;
|
||||
using osu.Game.Tests.Beatmaps;
|
||||
|
||||
namespace osu.Game.Rulesets.Catch.Tests
|
||||
{
|
||||
public class CatchBeatmapConversionTest : BeatmapConversionTest<ConvertValue>
|
||||
{
|
||||
protected override string ResourceAssembly => "osu.Game.Rulesets.Catch";
|
||||
|
||||
[TestCase("basic"), Ignore("See: https://github.com/ppy/osu/issues/2232")]
|
||||
public new void Test(string name)
|
||||
{
|
||||
base.Test(name);
|
||||
}
|
||||
|
||||
protected override IEnumerable<ConvertValue> CreateConvertValue(HitObject hitObject)
|
||||
{
|
||||
if (hitObject is JuiceStream stream)
|
||||
{
|
||||
foreach (var nested in stream.NestedHitObjects)
|
||||
{
|
||||
yield return new ConvertValue
|
||||
{
|
||||
StartTime = nested.StartTime,
|
||||
Position = ((CatchHitObject)nested).X * CatchPlayfield.BASE_WIDTH
|
||||
};
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
yield return new ConvertValue
|
||||
{
|
||||
StartTime = hitObject.StartTime,
|
||||
Position = ((CatchHitObject)hitObject).X * CatchPlayfield.BASE_WIDTH
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
protected override IBeatmapConverter CreateConverter(Beatmap beatmap) => new CatchBeatmapConverter();
|
||||
}
|
||||
|
||||
public struct ConvertValue : IEquatable<ConvertValue>
|
||||
{
|
||||
/// <summary>
|
||||
/// A sane value to account for osu!stable using ints everwhere.
|
||||
/// </summary>
|
||||
private const float conversion_lenience = 2;
|
||||
|
||||
public double StartTime;
|
||||
public float Position;
|
||||
|
||||
public bool Equals(ConvertValue other)
|
||||
=> Precision.AlmostEquals(StartTime, other.StartTime, conversion_lenience)
|
||||
&& Precision.AlmostEquals(Position, other.Position, conversion_lenience);
|
||||
}
|
||||
}
|
@ -12,7 +12,6 @@ using osu.Game.Rulesets.Catch.UI;
|
||||
namespace osu.Game.Rulesets.Catch.Tests
|
||||
{
|
||||
[TestFixture]
|
||||
[Ignore("getting CI working")]
|
||||
public class TestCaseBananaShower : Game.Tests.Visual.TestCasePlayer
|
||||
{
|
||||
public override IReadOnlyList<Type> RequiredTypes => new[]
|
||||
@ -29,16 +28,14 @@ namespace osu.Game.Rulesets.Catch.Tests
|
||||
{
|
||||
}
|
||||
|
||||
protected override Beatmap CreateBeatmap()
|
||||
protected override Beatmap CreateBeatmap(Ruleset ruleset)
|
||||
{
|
||||
var beatmap = new Beatmap
|
||||
{
|
||||
BeatmapInfo = new BeatmapInfo
|
||||
{
|
||||
BaseDifficulty = new BeatmapDifficulty
|
||||
{
|
||||
CircleSize = 6,
|
||||
}
|
||||
BaseDifficulty = new BeatmapDifficulty { CircleSize = 6 },
|
||||
Ruleset = ruleset.RulesetInfo
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -6,7 +6,6 @@ using NUnit.Framework;
|
||||
namespace osu.Game.Rulesets.Catch.Tests
|
||||
{
|
||||
[TestFixture]
|
||||
[Ignore("getting CI working")]
|
||||
public class TestCaseCatchPlayer : Game.Tests.Visual.TestCasePlayer
|
||||
{
|
||||
public TestCaseCatchPlayer() : base(new CatchRuleset())
|
||||
|
@ -8,7 +8,6 @@ using osu.Game.Rulesets.Catch.Objects;
|
||||
namespace osu.Game.Rulesets.Catch.Tests
|
||||
{
|
||||
[TestFixture]
|
||||
[Ignore("getting CI working")]
|
||||
public class TestCaseCatchStacker : Game.Tests.Visual.TestCasePlayer
|
||||
{
|
||||
public TestCaseCatchStacker()
|
||||
@ -16,19 +15,18 @@ namespace osu.Game.Rulesets.Catch.Tests
|
||||
{
|
||||
}
|
||||
|
||||
protected override Beatmap CreateBeatmap()
|
||||
protected override Beatmap CreateBeatmap(Ruleset ruleset)
|
||||
{
|
||||
var beatmap = new Beatmap
|
||||
{
|
||||
BeatmapInfo = new BeatmapInfo
|
||||
{
|
||||
BaseDifficulty = new BeatmapDifficulty
|
||||
{
|
||||
CircleSize = 6,
|
||||
}
|
||||
BaseDifficulty = new BeatmapDifficulty { CircleSize = 6 },
|
||||
Ruleset = ruleset.RulesetInfo
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
for (int i = 0; i < 512; i++)
|
||||
beatmap.HitObjects.Add(new Fruit { X = 0.5f + i / 2048f * (i % 10 - 5), StartTime = i * 100, NewCombo = i % 8 == 0 });
|
||||
|
||||
|
@ -13,7 +13,6 @@ using osu.Game.Tests.Visual;
|
||||
namespace osu.Game.Rulesets.Catch.Tests
|
||||
{
|
||||
[TestFixture]
|
||||
[Ignore("getting CI working")]
|
||||
public class TestCaseCatcherArea : OsuTestCase
|
||||
{
|
||||
private RulesetInfo catchRuleset;
|
||||
|
@ -6,17 +6,15 @@ using System.Collections.Generic;
|
||||
using NUnit.Framework;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.MathUtils;
|
||||
using osu.Game.Rulesets.Catch.Objects;
|
||||
using osu.Game.Rulesets.Catch.Objects.Drawable;
|
||||
using osu.Game.Rulesets.Catch.Objects.Drawable.Pieces;
|
||||
using osu.Game.Tests.Visual;
|
||||
using OpenTK;
|
||||
using OpenTK.Graphics;
|
||||
|
||||
namespace osu.Game.Rulesets.Catch.Tests
|
||||
{
|
||||
[Ignore("getting CI working")]
|
||||
[TestFixture]
|
||||
public class TestCaseFruitObjects : OsuTestCase
|
||||
{
|
||||
public override IReadOnlyList<Type> RequiredTypes => new[]
|
||||
@ -62,8 +60,6 @@ namespace osu.Game.Rulesets.Catch.Tests
|
||||
Scale = 1.5f,
|
||||
};
|
||||
|
||||
fruit.ComboColour = colourForRrepesentation(fruit.VisualRepresentation);
|
||||
|
||||
return new DrawableFruit(fruit)
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
@ -74,31 +70,5 @@ namespace osu.Game.Rulesets.Catch.Tests
|
||||
LifetimeEnd = double.PositiveInfinity,
|
||||
};
|
||||
}
|
||||
|
||||
private Color4 colourForRrepesentation(FruitVisualRepresentation representation)
|
||||
{
|
||||
switch (representation)
|
||||
{
|
||||
default:
|
||||
case FruitVisualRepresentation.Pear:
|
||||
return new Color4(17, 136, 170, 255);
|
||||
case FruitVisualRepresentation.Grape:
|
||||
return new Color4(204, 102, 0, 255);
|
||||
case FruitVisualRepresentation.Raspberry:
|
||||
return new Color4(121, 9, 13, 255);
|
||||
case FruitVisualRepresentation.Pineapple:
|
||||
return new Color4(102, 136, 0, 255);
|
||||
case FruitVisualRepresentation.Banana:
|
||||
switch (RNG.Next(0, 3))
|
||||
{
|
||||
default:
|
||||
return new Color4(255, 240, 0, 255);
|
||||
case 1:
|
||||
return new Color4(255, 192, 0, 255);
|
||||
case 2:
|
||||
return new Color4(214, 221, 28, 255);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -8,7 +8,6 @@ using osu.Game.Rulesets.Catch.Objects;
|
||||
namespace osu.Game.Rulesets.Catch.Tests
|
||||
{
|
||||
[TestFixture]
|
||||
[Ignore("getting CI working")]
|
||||
public class TestCaseHyperdash : Game.Tests.Visual.TestCasePlayer
|
||||
{
|
||||
public TestCaseHyperdash()
|
||||
@ -16,9 +15,10 @@ namespace osu.Game.Rulesets.Catch.Tests
|
||||
{
|
||||
}
|
||||
|
||||
protected override Beatmap CreateBeatmap()
|
||||
protected override Beatmap CreateBeatmap(Ruleset ruleset)
|
||||
{
|
||||
var beatmap = new Beatmap();
|
||||
var beatmap = new Beatmap { BeatmapInfo = { Ruleset = ruleset.RulesetInfo } };
|
||||
|
||||
|
||||
for (int i = 0; i < 512; i++)
|
||||
if (i % 5 < 3)
|
||||
|
@ -5,7 +5,7 @@ using NUnit.Framework;
|
||||
|
||||
namespace osu.Game.Rulesets.Catch.Tests
|
||||
{
|
||||
[Ignore("getting CI working")]
|
||||
[TestFixture]
|
||||
public class TestCasePerformancePoints : Game.Tests.Visual.TestCasePerformancePoints
|
||||
{
|
||||
public TestCasePerformancePoints()
|
||||
|
@ -3,6 +3,7 @@
|
||||
|
||||
using osu.Framework.Input;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Input.Handlers;
|
||||
using osu.Game.Rulesets.Catch.Beatmaps;
|
||||
using osu.Game.Rulesets.Catch.Objects;
|
||||
using osu.Game.Rulesets.Catch.Objects.Drawable;
|
||||
@ -26,7 +27,7 @@ namespace osu.Game.Rulesets.Catch.UI
|
||||
|
||||
public override ScoreProcessor CreateScoreProcessor() => new CatchScoreProcessor(this);
|
||||
|
||||
protected override FramedReplayInputHandler CreateReplayInputHandler(Replay replay) => new CatchFramedReplayInputHandler(replay);
|
||||
protected override ReplayInputHandler CreateReplayInputHandler(Replay replay) => new CatchFramedReplayInputHandler(replay);
|
||||
|
||||
protected override BeatmapProcessor<CatchHitObject> CreateBeatmapProcessor() => new CatchBeatmapProcessor();
|
||||
|
||||
|
@ -54,7 +54,6 @@ namespace osu.Game.Rulesets.Catch.UI
|
||||
|
||||
if (caughtFruit == null) return;
|
||||
|
||||
caughtFruit.AccentColour = fruit.AccentColour;
|
||||
caughtFruit.RelativePositionAxes = Axes.None;
|
||||
caughtFruit.Position = new Vector2(MovableCatcher.ToLocalSpace(fruit.ScreenSpaceDrawQuad.Centre).X - MovableCatcher.DrawSize.X / 2, 0);
|
||||
|
||||
|
Reference in New Issue
Block a user