mirror of
https://github.com/ppy/osu.git
synced 2024-09-21 16:07:24 +08:00
Deprecate old overload of Apply
This commit is contained in:
parent
73d3da1687
commit
3fbeadf318
@ -32,7 +32,7 @@ namespace osu.Game.Rulesets.Osu.Tests
|
|||||||
{
|
{
|
||||||
Position = new Vector2(128, 128),
|
Position = new Vector2(128, 128),
|
||||||
ComboIndex = 1,
|
ComboIndex = 1,
|
||||||
}), null));
|
})));
|
||||||
}
|
}
|
||||||
|
|
||||||
private HitCircle prepareObject(HitCircle circle)
|
private HitCircle prepareObject(HitCircle circle)
|
||||||
|
@ -57,7 +57,7 @@ namespace osu.Game.Rulesets.Osu.Tests
|
|||||||
new Vector2(300, 0),
|
new Vector2(300, 0),
|
||||||
}),
|
}),
|
||||||
RepeatCount = 1
|
RepeatCount = 1
|
||||||
}), null));
|
})));
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
@ -37,7 +37,7 @@ namespace osu.Game.Rulesets.Osu.Tests
|
|||||||
Position = new Vector2(256, 192),
|
Position = new Vector2(256, 192),
|
||||||
ComboIndex = 1,
|
ComboIndex = 1,
|
||||||
Duration = 1000,
|
Duration = 1000,
|
||||||
}), null));
|
})));
|
||||||
|
|
||||||
AddAssert("rotation is reset", () => dho.Result.RateAdjustedRotation == 0);
|
AddAssert("rotation is reset", () => dho.Result.RateAdjustedRotation == 0);
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,7 @@ namespace osu.Game.Rulesets.Taiko.Tests
|
|||||||
{
|
{
|
||||||
StartTime = 400,
|
StartTime = 400,
|
||||||
Major = true
|
Major = true
|
||||||
}), null));
|
})));
|
||||||
AddHitObject(barLine);
|
AddHitObject(barLine);
|
||||||
RemoveHitObject(barLine);
|
RemoveHitObject(barLine);
|
||||||
|
|
||||||
@ -26,7 +26,7 @@ namespace osu.Game.Rulesets.Taiko.Tests
|
|||||||
{
|
{
|
||||||
StartTime = 200,
|
StartTime = 200,
|
||||||
Major = false
|
Major = false
|
||||||
}), null));
|
})));
|
||||||
AddHitObject(barLine);
|
AddHitObject(barLine);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@ namespace osu.Game.Rulesets.Taiko.Tests
|
|||||||
Duration = 500,
|
Duration = 500,
|
||||||
IsStrong = false,
|
IsStrong = false,
|
||||||
TickRate = 2
|
TickRate = 2
|
||||||
}), null));
|
})));
|
||||||
|
|
||||||
AddHitObject(drumRoll);
|
AddHitObject(drumRoll);
|
||||||
RemoveHitObject(drumRoll);
|
RemoveHitObject(drumRoll);
|
||||||
@ -31,7 +31,7 @@ namespace osu.Game.Rulesets.Taiko.Tests
|
|||||||
Duration = 400,
|
Duration = 400,
|
||||||
IsStrong = true,
|
IsStrong = true,
|
||||||
TickRate = 16
|
TickRate = 16
|
||||||
}), null));
|
})));
|
||||||
|
|
||||||
AddHitObject(drumRoll);
|
AddHitObject(drumRoll);
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@ namespace osu.Game.Rulesets.Taiko.Tests
|
|||||||
Type = HitType.Rim,
|
Type = HitType.Rim,
|
||||||
IsStrong = false,
|
IsStrong = false,
|
||||||
StartTime = 300
|
StartTime = 300
|
||||||
}), null));
|
})));
|
||||||
|
|
||||||
AddHitObject(hit);
|
AddHitObject(hit);
|
||||||
RemoveHitObject(hit);
|
RemoveHitObject(hit);
|
||||||
@ -29,7 +29,7 @@ namespace osu.Game.Rulesets.Taiko.Tests
|
|||||||
Type = HitType.Centre,
|
Type = HitType.Centre,
|
||||||
IsStrong = true,
|
IsStrong = true,
|
||||||
StartTime = 500
|
StartTime = 500
|
||||||
}), null));
|
})));
|
||||||
|
|
||||||
AddHitObject(hit);
|
AddHitObject(hit);
|
||||||
}
|
}
|
||||||
|
@ -206,12 +206,9 @@ 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>
|
||||||
/// <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)
|
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)
|
if (lifetimeEntry != null)
|
||||||
Apply(lifetimeEntry);
|
Apply(lifetimeEntry);
|
||||||
else
|
else
|
||||||
|
@ -362,7 +362,7 @@ namespace osu.Game.Rulesets.UI
|
|||||||
lifetimeEntryMap[hitObject] = entry = CreateLifetimeEntry(hitObject);
|
lifetimeEntryMap[hitObject] = entry = CreateLifetimeEntry(hitObject);
|
||||||
|
|
||||||
dho.ParentHitObject = parent;
|
dho.ParentHitObject = parent;
|
||||||
dho.Apply(hitObject, entry);
|
dho.Apply(entry);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user