diff --git a/assets/HitObjectLines/135.svg b/assets/HitObjectLines/135.svg
deleted file mode 100644
index 77012bff0..000000000
--- a/assets/HitObjectLines/135.svg
+++ /dev/null
@@ -1,363 +0,0 @@
-
-
diff --git a/assets/HitObjectLines/180.svg b/assets/HitObjectLines/180.svg
deleted file mode 100644
index b24373687..000000000
--- a/assets/HitObjectLines/180.svg
+++ /dev/null
@@ -1,363 +0,0 @@
-
-
diff --git a/assets/HitObjectLines/225.svg b/assets/HitObjectLines/225.svg
deleted file mode 100644
index 834dc4c44..000000000
--- a/assets/HitObjectLines/225.svg
+++ /dev/null
@@ -1,363 +0,0 @@
-
-
diff --git a/assets/HitObjectLines/360.svg b/assets/HitObjectLines/360.svg
deleted file mode 100644
index daae2de45..000000000
--- a/assets/HitObjectLines/360.svg
+++ /dev/null
@@ -1,356 +0,0 @@
-
-
diff --git a/assets/HitObjectLines/90.svg b/assets/HitObjectLines/90.svg
deleted file mode 100644
index 8208c0932..000000000
--- a/assets/HitObjectLines/90.svg
+++ /dev/null
@@ -1,363 +0,0 @@
-
-
diff --git a/osu.Game.Rulesets.Sentakki/Resources/Textures/Lines/135.png b/osu.Game.Rulesets.Sentakki/Resources/Textures/Lines/135.png
deleted file mode 100644
index af6958106..000000000
Binary files a/osu.Game.Rulesets.Sentakki/Resources/Textures/Lines/135.png and /dev/null differ
diff --git a/osu.Game.Rulesets.Sentakki/Resources/Textures/Lines/180.png b/osu.Game.Rulesets.Sentakki/Resources/Textures/Lines/180.png
deleted file mode 100644
index 0ae17c78a..000000000
Binary files a/osu.Game.Rulesets.Sentakki/Resources/Textures/Lines/180.png and /dev/null differ
diff --git a/osu.Game.Rulesets.Sentakki/Resources/Textures/Lines/225.png b/osu.Game.Rulesets.Sentakki/Resources/Textures/Lines/225.png
deleted file mode 100644
index 38d3e23b0..000000000
Binary files a/osu.Game.Rulesets.Sentakki/Resources/Textures/Lines/225.png and /dev/null differ
diff --git a/osu.Game.Rulesets.Sentakki/Resources/Textures/Lines/360.png b/osu.Game.Rulesets.Sentakki/Resources/Textures/Lines/360.png
deleted file mode 100644
index a586aec0e..000000000
Binary files a/osu.Game.Rulesets.Sentakki/Resources/Textures/Lines/360.png and /dev/null differ
diff --git a/osu.Game.Rulesets.Sentakki/Resources/Textures/Lines/90.png b/osu.Game.Rulesets.Sentakki/Resources/Textures/Lines/90.png
deleted file mode 100644
index 620c4dcc1..000000000
Binary files a/osu.Game.Rulesets.Sentakki/Resources/Textures/Lines/90.png and /dev/null differ
diff --git a/osu.Game.Rulesets.Sentakki/UI/Components/HitObjectLine/DrawableLine.cs b/osu.Game.Rulesets.Sentakki/UI/Components/HitObjectLine/DrawableLine.cs
index def1d1a74..ac528be96 100644
--- a/osu.Game.Rulesets.Sentakki/UI/Components/HitObjectLine/DrawableLine.cs
+++ b/osu.Game.Rulesets.Sentakki/UI/Components/HitObjectLine/DrawableLine.cs
@@ -2,8 +2,7 @@
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Pooling;
-using osu.Framework.Graphics.Sprites;
-using osu.Framework.Graphics.Textures;
+using osu.Framework.Graphics.UserInterface;
using osu.Game.Rulesets.Sentakki.Configuration;
using osuTK;
@@ -15,7 +14,8 @@ public class DrawableLine : PoolableDrawable
public LineLifetimeEntry Entry = null!;
- public LineType Type;
+ private CircularProgress line = null!;
+
public DrawableLine()
{
RelativeSizeAxes = Axes.Both;
@@ -27,18 +27,20 @@ public DrawableLine()
private readonly BindableDouble animationDuration = new BindableDouble(1000);
[BackgroundDependencyLoader]
- private void load(SentakkiRulesetConfigManager? sentakkiConfigs, TextureStore textures)
+ private void load(SentakkiRulesetConfigManager? sentakkiConfigs)
{
sentakkiConfigs?.BindWith(SentakkiRulesetSettings.AnimationDuration, animationDuration);
animationDuration.BindValueChanged(_ => resetAnimation());
- AddInternal(new Sprite()
+ AddInternal(line = new CircularProgress()
{
RelativeSizeAxes = Axes.Both,
FillMode = FillMode.Fit,
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,
- Texture = textures.Get(LineTexturePath)
+ InnerRadius = 0.026f,
+ RoundedCaps = true,
+ Alpha = 0.8f,
});
}
@@ -48,6 +50,7 @@ protected override void PrepareForUse()
Colour = Entry.Colour;
Rotation = Entry.Rotation;
+ line.Current.Value = Entry.AngleRange;
resetAnimation();
}
@@ -59,27 +62,5 @@ private void resetAnimation()
using (BeginAbsoluteSequence(Entry.StartTime - Entry.AdjustedAnimationDuration))
this.FadeIn(Entry.AdjustedAnimationDuration / 2).Then().ScaleTo(1, Entry.AdjustedAnimationDuration / 2).Then().FadeOut();
}
-
- public string LineTexturePath
- {
- get
- {
- switch (Type)
- {
- case LineType.Single:
- return "Lines/90";
- case LineType.OneAway:
- return "Lines/135";
- case LineType.TwoAway:
- return "Lines/180";
- case LineType.ThreeAway:
- return "Lines/225";
- case LineType.FullCircle:
- return "Lines/360";
- default:
- return "";
- }
- }
- }
}
}
diff --git a/osu.Game.Rulesets.Sentakki/UI/Components/HitObjectLine/LineLifetimeEntry.cs b/osu.Game.Rulesets.Sentakki/UI/Components/HitObjectLine/LineLifetimeEntry.cs
index 68e5b92d5..acfa8645b 100644
--- a/osu.Game.Rulesets.Sentakki/UI/Components/HitObjectLine/LineLifetimeEntry.cs
+++ b/osu.Game.Rulesets.Sentakki/UI/Components/HitObjectLine/LineLifetimeEntry.cs
@@ -12,7 +12,7 @@ namespace osu.Game.Rulesets.Sentakki.UI.Components.HitObjectLine
{
public class LineLifetimeEntry : LifetimeEntry
{
- public BindableDouble AnimationDuration = new BindableDouble(1000);
+ private readonly BindableDouble AnimationDuration = new BindableDouble(1000);
public double AdjustedAnimationDuration => AnimationDuration.Value * GameplaySpeed;
public double GameplaySpeed => drawableRuleset?.GameplaySpeed ?? 1;
@@ -31,7 +31,7 @@ public LineLifetimeEntry(BindableDouble AnimationDuration, DrawableSentakkiRules
public List HitObjects = new List();
- public LineType Type { get; private set; }
+ public float AngleRange { get; private set; }
public ColourInfo Colour { get; private set; }
public float Rotation { get; private set; }
@@ -61,12 +61,12 @@ public void UpdateLine()
{
if (HitObjects.Count == 1)
{
- Type = LineType.Single;
+ AngleRange = 0.25f;
var hitObject = HitObjects.First();
Colour = hitObject.Break ? Color4.OrangeRed : hitObject.DefaultNoteColour;
- Rotation = hitObject.Lane.GetRotationForLane();
+ Rotation = hitObject.Lane.GetRotationForLane() - 45;
}
else if (HitObjects.Count > 1)
{
@@ -76,10 +76,13 @@ public void UpdateLine()
int delta = maxDelta - minDelta;
bool allBreaks = HitObjects.All(h => h.Break);
-
- Type = getLineTypeForDistance(Math.Abs(delta));
Colour = Color4.Gold;
- Rotation = anchor.Lane.GetRotationForLane() + (delta * 22.5f);
+
+ int angleRange = 90 + (45 * delta);
+
+ AngleRange = angleRange / 360f;
+
+ Rotation = anchor.Lane.GetRotationForLane() + (delta * 22.5f) - (angleRange / 2);
}
// Notify the renderer that the line may be updated
@@ -92,23 +95,6 @@ private void refreshLifetime(ValueChangedEvent valueChangedEvent)
LifetimeEnd = StartTime;
}
- private static LineType getLineTypeForDistance(int distance)
- {
- switch (distance)
- {
- case 0:
- return LineType.Single;
- case 1:
- return LineType.OneAway;
- case 2:
- return LineType.TwoAway;
- case 3:
- return LineType.ThreeAway;
- default:
- return LineType.FullCircle;
- }
- }
-
private static int getDelta(SentakkiLanedHitObject a, SentakkiLanedHitObject b)
{
int delta = b.Lane - a.Lane;
diff --git a/osu.Game.Rulesets.Sentakki/UI/Components/HitObjectLine/LineRenderer.cs b/osu.Game.Rulesets.Sentakki/UI/Components/HitObjectLine/LineRenderer.cs
index 81d98be5e..58e26b5e6 100644
--- a/osu.Game.Rulesets.Sentakki/UI/Components/HitObjectLine/LineRenderer.cs
+++ b/osu.Game.Rulesets.Sentakki/UI/Components/HitObjectLine/LineRenderer.cs
@@ -1,4 +1,3 @@
-using System;
using System.Collections.Generic;
using System.Linq;
using osu.Framework.Allocation;
@@ -21,7 +20,7 @@ public class LineRenderer : CompositeDrawable
private readonly Dictionary linesInUse = new Dictionary();
private readonly LifetimeEntryManager lifetimeManager = new LifetimeEntryManager();
- private readonly Dictionary> linePools = new Dictionary>();
+ private DrawablePool linePool = null!;
public LineRenderer()
{
@@ -41,10 +40,7 @@ private void load(SentakkiRulesetConfigManager? sentakkiConfigs)
{
sentakkiConfigs?.BindWith(SentakkiRulesetSettings.AnimationDuration, animationDuration);
- foreach (var type in Enum.GetValues(typeof(LineType)).OfType())
- linePools.Add(type, new DrawableLinePool(type));
-
- AddRangeInternal(linePools.Values);
+ AddInternal(linePool = new DrawablePool(5));
}
protected override bool CheckChildrenLife()
@@ -57,7 +53,7 @@ protected override bool CheckChildrenLife()
private void onEntryBecameAlive(LifetimeEntry entry)
{
var laneLifetimeEntry = (LineLifetimeEntry)entry;
- var line = linePools[laneLifetimeEntry.Type].Get();
+ var line = linePool.Get();
line.Entry = laneLifetimeEntry;
linesInUse[entry] = line;
@@ -133,19 +129,5 @@ private void addHitObjectToEntry(double entryTime, SentakkiLanedHitObject hitObj
}
lineEntries[entryTime].Add(hitObject);
}
-
- public class DrawableLinePool : DrawablePool
- {
- private readonly LineType type;
-
- public DrawableLinePool(LineType type)
- : base(5)
- {
- this.type = type;
- }
-
- protected override DrawableLine CreateNewDrawable()
- => new DrawableLine { Type = type };
- }
}
}
diff --git a/osu.Game.Rulesets.Sentakki/UI/Components/HitObjectLine/LineType.cs b/osu.Game.Rulesets.Sentakki/UI/Components/HitObjectLine/LineType.cs
deleted file mode 100644
index 5e0327958..000000000
--- a/osu.Game.Rulesets.Sentakki/UI/Components/HitObjectLine/LineType.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-namespace osu.Game.Rulesets.Sentakki.UI.Components.HitObjectLine
-{
- public enum LineType
- {
- Single,
- OneAway,
- TwoAway,
- ThreeAway,
- FullCircle,
- }
-}