mirror of
https://github.com/ppy/osu.git
synced 2024-11-09 09:37:42 +08:00
30 lines
986 B
C#
30 lines
986 B
C#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
// See the LICENCE file in the repository root for full licence text.
|
|
|
|
using osu.Framework.Bindables;
|
|
using osu.Game.Rulesets.Catch.Skinning.Default;
|
|
|
|
namespace osu.Game.Rulesets.Catch.Objects.Drawables
|
|
{
|
|
/// <summary>
|
|
/// Represents a <see cref="Fruit"/> caught by the catcher.
|
|
/// </summary>
|
|
public class CaughtFruit : CaughtObject, IHasFruitState
|
|
{
|
|
public Bindable<FruitVisualRepresentation> VisualRepresentation { get; } = new Bindable<FruitVisualRepresentation>();
|
|
|
|
public CaughtFruit()
|
|
: base(CatchSkinComponents.Fruit, _ => new FruitPiece())
|
|
{
|
|
}
|
|
|
|
public override void CopyStateFrom(IHasCatchObjectState objectState)
|
|
{
|
|
base.CopyStateFrom(objectState);
|
|
|
|
var fruitState = (IHasFruitState)objectState;
|
|
VisualRepresentation.Value = fruitState.VisualRepresentation.Value;
|
|
}
|
|
}
|
|
}
|