1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 14:47:25 +08:00

Deprecate old overload of Apply

This commit is contained in:
ekrctb 2021-04-21 14:32:37 +09:00
parent 73d3da1687
commit 3fbeadf318
8 changed files with 11 additions and 14 deletions

View File

@ -32,7 +32,7 @@ namespace osu.Game.Rulesets.Osu.Tests
{
Position = new Vector2(128, 128),
ComboIndex = 1,
}), null));
})));
}
private HitCircle prepareObject(HitCircle circle)

View File

@ -57,7 +57,7 @@ namespace osu.Game.Rulesets.Osu.Tests
new Vector2(300, 0),
}),
RepeatCount = 1
}), null));
})));
}
[Test]

View File

@ -37,7 +37,7 @@ namespace osu.Game.Rulesets.Osu.Tests
Position = new Vector2(256, 192),
ComboIndex = 1,
Duration = 1000,
}), null));
})));
AddAssert("rotation is reset", () => dho.Result.RateAdjustedRotation == 0);
}

View File

@ -18,7 +18,7 @@ namespace osu.Game.Rulesets.Taiko.Tests
{
StartTime = 400,
Major = true
}), null));
})));
AddHitObject(barLine);
RemoveHitObject(barLine);
@ -26,7 +26,7 @@ namespace osu.Game.Rulesets.Taiko.Tests
{
StartTime = 200,
Major = false
}), null));
})));
AddHitObject(barLine);
}
}

View File

@ -20,7 +20,7 @@ namespace osu.Game.Rulesets.Taiko.Tests
Duration = 500,
IsStrong = false,
TickRate = 2
}), null));
})));
AddHitObject(drumRoll);
RemoveHitObject(drumRoll);
@ -31,7 +31,7 @@ namespace osu.Game.Rulesets.Taiko.Tests
Duration = 400,
IsStrong = true,
TickRate = 16
}), null));
})));
AddHitObject(drumRoll);
}

View File

@ -19,7 +19,7 @@ namespace osu.Game.Rulesets.Taiko.Tests
Type = HitType.Rim,
IsStrong = false,
StartTime = 300
}), null));
})));
AddHitObject(hit);
RemoveHitObject(hit);
@ -29,7 +29,7 @@ namespace osu.Game.Rulesets.Taiko.Tests
Type = HitType.Centre,
IsStrong = true,
StartTime = 500
}), null));
})));
AddHitObject(hit);
}

View File

@ -206,12 +206,9 @@ namespace osu.Game.Rulesets.Objects.Drawables
/// <summary>
/// Applies a hit object to be represented by this <see cref="DrawableHitObject"/>.
/// </summary>
/// <remarks>This overload is semi-deprecated. Use either <see cref="Apply(osu.Game.Rulesets.Objects.HitObject)"/> or <see cref="Apply(osu.Game.Rulesets.Objects.HitObjectLifetimeEntry)"/>.</remarks>
[Obsolete("Use either overload of Apply that takes a single argument of type HitObject or HitObjectLifetimeEntry")]
public void Apply([NotNull] HitObject hitObject, [CanBeNull] HitObjectLifetimeEntry lifetimeEntry)
{
if (lifetimeEntry != null && lifetimeEntry.HitObject != hitObject)
throw new InvalidOperationException($"{nameof(HitObjectLifetimeEntry)} has different {nameof(HitObject)} from the specified one.");
if (lifetimeEntry != null)
Apply(lifetimeEntry);
else

View File

@ -362,7 +362,7 @@ namespace osu.Game.Rulesets.UI
lifetimeEntryMap[hitObject] = entry = CreateLifetimeEntry(hitObject);
dho.ParentHitObject = parent;
dho.Apply(hitObject, entry);
dho.Apply(entry);
});
}