mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Move fruit visual logic from CHO to DrawableFruit
This commit is contained in:
@ -30,7 +30,7 @@ namespace osu.Game.Rulesets.Catch.Tests
|
||||
}
|
||||
|
||||
private Drawable createDrawableFruit(FruitVisualRepresentation rep, bool hyperdash = false) =>
|
||||
setProperties(new DrawableFruit(new TestCatchFruit(rep)), hyperdash);
|
||||
setProperties(new TestDrawableFruit(new Fruit(), rep), hyperdash);
|
||||
|
||||
private Drawable createDrawableDroplet(bool hyperdash = false) => setProperties(new DrawableDroplet(new Droplet()), hyperdash);
|
||||
|
||||
@ -56,14 +56,17 @@ namespace osu.Game.Rulesets.Catch.Tests
|
||||
return d;
|
||||
}
|
||||
|
||||
public class TestCatchFruit : Fruit
|
||||
public class TestDrawableFruit : DrawableFruit
|
||||
{
|
||||
public TestCatchFruit(FruitVisualRepresentation rep)
|
||||
{
|
||||
VisualRepresentation = rep;
|
||||
}
|
||||
private readonly FruitVisualRepresentation visualRepresentation;
|
||||
|
||||
public override FruitVisualRepresentation VisualRepresentation { get; }
|
||||
protected override FruitVisualRepresentation GetVisualRepresentation(int indexInBeatmap) => visualRepresentation;
|
||||
|
||||
public TestDrawableFruit(Fruit fruit, FruitVisualRepresentation rep)
|
||||
: base(fruit)
|
||||
{
|
||||
visualRepresentation = rep;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user