Merge branch 'master' into catch-drawable-namespace

This commit is contained in:
Dean Herbert
2020-02-21 10:31:31 +09:00
82 changed files with 1725 additions and 732 deletions

View File

@ -16,10 +16,10 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawables
private Color4? colour;
protected override void UpdateComboColour(Color4 proposedColour, IReadOnlyList<Color4> comboColours)
protected override Color4 GetComboColour(IReadOnlyList<Color4> comboColours)
{
// override any external colour changes with banananana
AccentColour.Value = (colour ??= getBananaColour());
return colour ??= getBananaColour();
}
private Color4 getBananaColour()

View File

@ -19,7 +19,7 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawables
{
public override bool CanBePlated => true;
protected Container ScaleContainer;
protected Container ScaleContainer { get; private set; }
protected PalpableCatchHitObject(TObject hitObject)
: base(hitObject)
@ -45,11 +45,8 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawables
ScaleContainer.Scale = new Vector2(HitObject.Scale);
}
protected override void UpdateComboColour(Color4 proposedColour, IReadOnlyList<Color4> comboColours)
{
// ignore the incoming combo colour as we use a custom lookup
AccentColour.Value = comboColours[(HitObject.IndexInBeatmap + 1) % comboColours.Count];
}
protected override Color4 GetComboColour(IReadOnlyList<Color4> comboColours) =>
comboColours[(HitObject.IndexInBeatmap + 1) % comboColours.Count];
}
public abstract class DrawableCatchHitObject<TObject> : DrawableCatchHitObject

View File

@ -4,7 +4,6 @@
using osu.Framework.Allocation;
using osu.Game.Rulesets.Catch.Objects.Drawables.Pieces;
using osu.Game.Skinning;
using osuTK.Graphics;
namespace osu.Game.Rulesets.Catch.Objects.Drawables
{
@ -20,12 +19,11 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawables
[BackgroundDependencyLoader]
private void load()
{
ScaleContainer.Child = new SkinnableDrawable(
new CatchSkinComponent(CatchSkinComponents.Droplet), _ => new Pulp
{
Size = Size / 4,
AccentColour = { Value = Color4.White }
});
ScaleContainer.Child = new SkinnableDrawable(new CatchSkinComponent(CatchSkinComponents.Droplet), _ => new Pulp
{
Size = Size / 4,
AccentColour = { BindTarget = AccentColour }
});
}
}
}

View File

@ -46,7 +46,7 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawables
((DrawableCatchHitObject)o).CheckPosition = p => CheckPosition?.Invoke(p) ?? false);
}
return null;
throw new ArgumentException($"{nameof(hitObject)} must be of type {nameof(CatchHitObject)}.");
}
}
}

View File

@ -15,7 +15,7 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawables
[BackgroundDependencyLoader]
private void load()
{
Scale /= 2;
ScaleContainer.Scale /= 2;
}
}
}