mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 19:22:56 +08:00
Merge pull request #13400 from peppy/remove-obsoleted-drawable-judgement-methods
Remove some obsoleted members
This commit is contained in:
commit
8a221f501d
@ -57,12 +57,6 @@ namespace osu.Game.Graphics.Backgrounds
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Whether we want to expire triangles as they exit our draw area completely.
|
|
||||||
/// </summary>
|
|
||||||
[Obsolete("Unused.")] // Can be removed 20210518
|
|
||||||
protected virtual bool ExpireOffScreenTriangles => true;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Whether we should create new triangles as others expire.
|
/// Whether we should create new triangles as others expire.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
// 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.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
@ -32,18 +31,6 @@ namespace osu.Game.Rulesets.Judgements
|
|||||||
|
|
||||||
private readonly Container aboveHitObjectsContent;
|
private readonly Container aboveHitObjectsContent;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Duration of initial fade in.
|
|
||||||
/// </summary>
|
|
||||||
[Obsolete("Apply any animations manually via ApplyHitAnimations / ApplyMissAnimations. Defaults were moved inside skinned components.")]
|
|
||||||
protected virtual double FadeInDuration => 100;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Duration to wait until fade out begins. Defaults to <see cref="FadeInDuration"/>.
|
|
||||||
/// </summary>
|
|
||||||
[Obsolete("Apply any animations manually via ApplyHitAnimations / ApplyMissAnimations. Defaults were moved inside skinned components.")]
|
|
||||||
protected virtual double FadeOutDelay => FadeInDuration;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates a drawable which visualises a <see cref="Judgements.Judgement"/>.
|
/// Creates a drawable which visualises a <see cref="Judgements.Judgement"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
// 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.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using System;
|
|
||||||
using osu.Game.Rulesets.Objects;
|
using osu.Game.Rulesets.Objects;
|
||||||
using osu.Game.Rulesets.Scoring;
|
using osu.Game.Rulesets.Scoring;
|
||||||
|
|
||||||
@ -69,14 +68,6 @@ namespace osu.Game.Rulesets.Judgements
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public double MaxHealthIncrease => HealthIncreaseFor(MaxResult);
|
public double MaxHealthIncrease => HealthIncreaseFor(MaxResult);
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Retrieves the numeric score representation of a <see cref="HitResult"/>.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="result">The <see cref="HitResult"/> to find the numeric score representation for.</param>
|
|
||||||
/// <returns>The numeric score representation of <paramref name="result"/>.</returns>
|
|
||||||
[Obsolete("Has no effect. Use ToNumericResult(HitResult) (standardised across all rulesets).")] // Can be made non-virtual 20210328
|
|
||||||
protected virtual int NumericResultFor(HitResult result) => ToNumericResult(result);
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Retrieves the numeric score representation of a <see cref="JudgementResult"/>.
|
/// Retrieves the numeric score representation of a <see cref="JudgementResult"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -192,7 +192,7 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Applies a hit object to be represented by this <see cref="DrawableHitObject"/>.
|
/// Applies a hit object to be represented by this <see cref="DrawableHitObject"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Obsolete("Use either overload of Apply that takes a single argument of type HitObject or HitObjectLifetimeEntry")]
|
[Obsolete("Use either overload of Apply that takes a single argument of type HitObject or HitObjectLifetimeEntry")] // Can be removed 20211021.
|
||||||
public void Apply([NotNull] HitObject hitObject, [CanBeNull] HitObjectLifetimeEntry lifetimeEntry)
|
public void Apply([NotNull] HitObject hitObject, [CanBeNull] HitObjectLifetimeEntry lifetimeEntry)
|
||||||
{
|
{
|
||||||
if (lifetimeEntry != null)
|
if (lifetimeEntry != null)
|
||||||
@ -409,11 +409,6 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
|||||||
using (BeginAbsoluteSequence(StateUpdateTime, true))
|
using (BeginAbsoluteSequence(StateUpdateTime, true))
|
||||||
UpdateStartTimeStateTransforms();
|
UpdateStartTimeStateTransforms();
|
||||||
|
|
||||||
#pragma warning disable 618
|
|
||||||
using (BeginAbsoluteSequence(StateUpdateTime + (Result?.TimeOffset ?? 0), true))
|
|
||||||
UpdateStateTransforms(newState);
|
|
||||||
#pragma warning restore 618
|
|
||||||
|
|
||||||
using (BeginAbsoluteSequence(HitStateUpdateTime, true))
|
using (BeginAbsoluteSequence(HitStateUpdateTime, true))
|
||||||
UpdateHitStateTransforms(newState);
|
UpdateHitStateTransforms(newState);
|
||||||
|
|
||||||
@ -447,7 +442,7 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
|||||||
/// By default, this will fade in the object from zero with no duration.
|
/// By default, this will fade in the object from zero with no duration.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// This is called once before every <see cref="UpdateStateTransforms"/>. This is to ensure a good state in the case
|
/// This is called once before every <see cref="UpdateHitStateTransforms"/>. This is to ensure a good state in the case
|
||||||
/// the <see cref="JudgementResult.TimeOffset"/> was negative and potentially altered the pre-hit transforms.
|
/// the <see cref="JudgementResult.TimeOffset"/> was negative and potentially altered the pre-hit transforms.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected virtual void UpdateInitialTransforms()
|
protected virtual void UpdateInitialTransforms()
|
||||||
@ -455,16 +450,6 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
|||||||
this.FadeInFromZero();
|
this.FadeInFromZero();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Apply transforms based on the current <see cref="ArmedState"/>. Previous states are automatically cleared.
|
|
||||||
/// In the case of a non-idle <see cref="ArmedState"/>, and if <see cref="Drawable.LifetimeEnd"/> was not set during this call, <see cref="Drawable.Expire"/> will be invoked.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="state">The new armed state.</param>
|
|
||||||
[Obsolete("Use UpdateStartTimeStateTransforms and UpdateHitStateTransforms instead")] // Can be removed 20210504
|
|
||||||
protected virtual void UpdateStateTransforms(ArmedState state)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Apply passive transforms at the <see cref="HitObject"/>'s StartTime.
|
/// Apply passive transforms at the <see cref="HitObject"/>'s StartTime.
|
||||||
/// This is called each time <see cref="State"/> changes.
|
/// This is called each time <see cref="State"/> changes.
|
||||||
@ -520,23 +505,6 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
|||||||
AccentColour.Value = combo.GetComboColour(comboColours);
|
AccentColour.Value = combo.GetComboColour(comboColours);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Called to retrieve the combo colour. Automatically assigned to <see cref="AccentColour"/>.
|
|
||||||
/// Defaults to using <see cref="IHasComboInformation.ComboIndex"/> to decide on a colour.
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// This will only be called if the <see cref="HitObject"/> implements <see cref="IHasComboInformation"/>.
|
|
||||||
/// </remarks>
|
|
||||||
/// <param name="comboColours">A list of combo colours provided by the beatmap or skin. Can be null if not available.</param>
|
|
||||||
[Obsolete("Unused. Implement IHasComboInformation and IHasComboInformation.GetComboColour() on the HitObject model instead.")] // Can be removed 20210527
|
|
||||||
protected virtual Color4 GetComboColour(IReadOnlyList<Color4> comboColours)
|
|
||||||
{
|
|
||||||
if (!(HitObject is IHasComboInformation combo))
|
|
||||||
throw new InvalidOperationException($"{nameof(HitObject)} must implement {nameof(IHasComboInformation)}");
|
|
||||||
|
|
||||||
return comboColours?.Count > 0 ? comboColours[combo.ComboIndex % comboColours.Count] : Color4.White;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Called when a change is made to the skin.
|
/// Called when a change is made to the skin.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -630,7 +598,7 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The time at which state transforms should be applied that line up to <see cref="HitObject"/>'s StartTime.
|
/// The time at which state transforms should be applied that line up to <see cref="HitObject"/>'s StartTime.
|
||||||
/// This is used to offset calls to <see cref="UpdateStateTransforms"/>.
|
/// This is used to offset calls to <see cref="UpdateStartTimeStateTransforms"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public double StateUpdateTime => HitObject.StartTime;
|
public double StateUpdateTime => HitObject.StartTime;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user