1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-14 17:52:56 +08:00

Add hiding Palpable HitObject property

This commit is contained in:
ekrctb 2020-11-25 08:07:59 +09:00
parent 6e55eb2090
commit 323533d945
4 changed files with 9 additions and 9 deletions

View File

@ -12,6 +12,8 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawables
{
public abstract class DrawablePalpableCatchHitObject : DrawableCatchHitObject
{
public new PalpableCatchHitObject HitObject => (PalpableCatchHitObject)base.HitObject;
/// <summary>
/// Whether this hit object should stay on the catcher plate when the object is caught by the catcher.
/// </summary>

View File

@ -22,8 +22,7 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawables
[BackgroundDependencyLoader]
private void load(DrawableHitObject drawableObject)
{
DrawableCatchHitObject drawableCatchObject = (DrawableCatchHitObject)drawableObject;
var hitObject = (PalpableCatchHitObject)drawableCatchObject.HitObject;
var drawableCatchObject = (DrawablePalpableCatchHitObject)drawableObject;
InternalChild = new Pulp
{
@ -31,7 +30,7 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawables
AccentColour = { BindTarget = drawableObject.AccentColour }
};
if (hitObject.HyperDash)
if (drawableCatchObject.HitObject.HyperDash)
{
AddInternal(new Container
{

View File

@ -30,12 +30,12 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawables
[BackgroundDependencyLoader]
private void load(DrawableHitObject drawableObject)
{
DrawableCatchHitObject drawableCatchObject = (DrawableCatchHitObject)drawableObject;
hitObject = (PalpableCatchHitObject)drawableCatchObject.HitObject;
var drawableCatchObject = (DrawablePalpableCatchHitObject)drawableObject;
hitObject = drawableCatchObject.HitObject;
AddRangeInternal(new[]
{
getFruitFor(drawableCatchObject.HitObject.VisualRepresentation),
getFruitFor(hitObject.VisualRepresentation),
border = new Circle
{
RelativeSizeAxes = Axes.Both,

View File

@ -6,7 +6,6 @@ using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites;
using osu.Game.Rulesets.Catch.Objects;
using osu.Game.Rulesets.Catch.Objects.Drawables;
using osu.Game.Rulesets.Catch.UI;
using osu.Game.Rulesets.Objects.Drawables;
@ -32,7 +31,7 @@ namespace osu.Game.Rulesets.Catch.Skinning
[BackgroundDependencyLoader]
private void load(DrawableHitObject drawableObject, ISkinSource skin)
{
DrawableCatchHitObject drawableCatchObject = (DrawableCatchHitObject)drawableObject;
var drawableCatchObject = (DrawablePalpableCatchHitObject)drawableObject;
accentColour.BindTo(drawableCatchObject.AccentColour);
@ -52,7 +51,7 @@ namespace osu.Game.Rulesets.Catch.Skinning
},
};
if (((PalpableCatchHitObject)drawableCatchObject.HitObject).HyperDash)
if (drawableCatchObject.HitObject.HyperDash)
{
var hyperDash = new Sprite
{