mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 02:33:02 +08:00
Use virtual property instead of a field for optional pieces
This commit is contained in:
parent
603cecb2eb
commit
4d5c242d35
@ -7,6 +7,8 @@ namespace osu.Game.Rulesets.Catch.Skinning.Default
|
|||||||
{
|
{
|
||||||
public class BananaPiece : CatchHitObjectPiece
|
public class BananaPiece : CatchHitObjectPiece
|
||||||
{
|
{
|
||||||
|
protected override BorderPiece BorderPiece { get; }
|
||||||
|
|
||||||
public BananaPiece()
|
public BananaPiece()
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both;
|
RelativeSizeAxes = Axes.Both;
|
||||||
|
@ -21,11 +21,17 @@ namespace osu.Game.Rulesets.Catch.Skinning.Default
|
|||||||
[CanBeNull]
|
[CanBeNull]
|
||||||
protected DrawableHitObject DrawableHitObject { get; private set; }
|
protected DrawableHitObject DrawableHitObject { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A part of this piece that will be faded out while falling in the playfield.
|
||||||
|
/// </summary>
|
||||||
[CanBeNull]
|
[CanBeNull]
|
||||||
protected BorderPiece BorderPiece;
|
protected virtual BorderPiece BorderPiece => null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A part of this piece that will be only visible when <see cref="HyperDash"/> is true.
|
||||||
|
/// </summary>
|
||||||
[CanBeNull]
|
[CanBeNull]
|
||||||
protected HyperBorderPiece HyperBorderPiece;
|
protected virtual HyperBorderPiece HyperBorderPiece => null;
|
||||||
|
|
||||||
protected override void LoadComplete()
|
protected override void LoadComplete()
|
||||||
{
|
{
|
||||||
|
@ -9,6 +9,8 @@ namespace osu.Game.Rulesets.Catch.Skinning.Default
|
|||||||
{
|
{
|
||||||
public class DropletPiece : CatchHitObjectPiece
|
public class DropletPiece : CatchHitObjectPiece
|
||||||
{
|
{
|
||||||
|
protected override HyperBorderPiece HyperBorderPiece { get; }
|
||||||
|
|
||||||
public DropletPiece()
|
public DropletPiece()
|
||||||
{
|
{
|
||||||
Size = new Vector2(CatchHitObject.OBJECT_RADIUS / 2);
|
Size = new Vector2(CatchHitObject.OBJECT_RADIUS / 2);
|
||||||
|
@ -16,6 +16,9 @@ namespace osu.Game.Rulesets.Catch.Skinning.Default
|
|||||||
|
|
||||||
public readonly Bindable<FruitVisualRepresentation> VisualRepresentation = new Bindable<FruitVisualRepresentation>();
|
public readonly Bindable<FruitVisualRepresentation> VisualRepresentation = new Bindable<FruitVisualRepresentation>();
|
||||||
|
|
||||||
|
protected override BorderPiece BorderPiece { get; }
|
||||||
|
protected override HyperBorderPiece HyperBorderPiece { get; }
|
||||||
|
|
||||||
public FruitPiece()
|
public FruitPiece()
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both;
|
RelativeSizeAxes = Axes.Both;
|
||||||
|
Loading…
Reference in New Issue
Block a user