diff --git a/osu.Game.Rulesets.Catch/Objects/Drawable/DrawableBanana.cs b/osu.Game.Rulesets.Catch/Objects/Drawable/DrawableBanana.cs index 4b4e381efd..8625b93786 100644 --- a/osu.Game.Rulesets.Catch/Objects/Drawable/DrawableBanana.cs +++ b/osu.Game.Rulesets.Catch/Objects/Drawable/DrawableBanana.cs @@ -1,7 +1,7 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -using osu.Framework.Bindables; +using System.Collections.Generic; using osu.Framework.Utils; using osuTK.Graphics; @@ -14,16 +14,9 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawable { } - protected override void LoadComplete() - { - base.LoadComplete(); - - AccentColour.BindValueChanged(accentChanged, true); - } - private Color4? colour; - private void accentChanged(ValueChangedEvent obj) + protected override void UpdateComboColour(Color4 proposedColour, IReadOnlyList comboColours) { // override any external colour changes with banananana AccentColour.Value = (colour ??= getBananaColour()); diff --git a/osu.Game.Rulesets.Catch/Objects/Drawable/DrawableDroplet.cs b/osu.Game.Rulesets.Catch/Objects/Drawable/DrawableDroplet.cs index e645b17c05..fc5a8b2938 100644 --- a/osu.Game.Rulesets.Catch/Objects/Drawable/DrawableDroplet.cs +++ b/osu.Game.Rulesets.Catch/Objects/Drawable/DrawableDroplet.cs @@ -1,6 +1,7 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. +using System.Collections.Generic; using osu.Framework.Allocation; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; @@ -15,13 +16,13 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawable { public override bool StaysOnPlate => false; + protected Container ScaleContainer; + public DrawableDroplet(Droplet h) : base(h) { } - protected Container ScaleContainer; - [BackgroundDependencyLoader] private void load() { @@ -46,5 +47,11 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawable ScaleContainer.Scale = new Vector2(HitObject.Scale); } + + protected override void UpdateComboColour(Color4 proposedColour, IReadOnlyList comboColours) + { + // ignore the incoming combo colour as we use a custom lookup + AccentColour.Value = comboColours[HitObject.IndexInBeatmap % comboColours.Count]; + } } } diff --git a/osu.Game.Rulesets.Catch/Objects/Drawable/DrawableFruit.cs b/osu.Game.Rulesets.Catch/Objects/Drawable/DrawableFruit.cs index edcb5eb13d..99f7e9386e 100644 --- a/osu.Game.Rulesets.Catch/Objects/Drawable/DrawableFruit.cs +++ b/osu.Game.Rulesets.Catch/Objects/Drawable/DrawableFruit.cs @@ -2,12 +2,14 @@ // See the LICENCE file in the repository root for full licence text. using System; +using System.Collections.Generic; using osu.Framework.Allocation; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Utils; using osu.Game.Skinning; using osuTK; +using osuTK.Graphics; namespace osu.Game.Rulesets.Catch.Objects.Drawable { @@ -42,6 +44,12 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawable scaleContainer.Scale = new Vector2(HitObject.Scale); } + protected override void UpdateComboColour(Color4 proposedColour, IReadOnlyList comboColours) + { + // ignore the incoming combo colour as we use a custom lookup + AccentColour.Value = comboColours[(HitObject.IndexInBeatmap + 1) % comboColours.Count]; + } + private CatchSkinComponents getComponent(FruitVisualRepresentation hitObjectVisualRepresentation) { switch (hitObjectVisualRepresentation)