mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 08:20:00 +09:00
Separate slider body to bypass snaking logic
The snaking logic contains a lot of caching/optimisations and offsetting of the path which is tedious to re-compute when the path changes.
This commit is contained in:
@ -0,0 +1,20 @@
|
||||
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System.Collections.Generic;
|
||||
using OpenTK;
|
||||
|
||||
namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
|
||||
{
|
||||
/// <summary>
|
||||
/// A <see cref="SliderBody"/> with the ability to set the drawn vertices manually.
|
||||
/// </summary>
|
||||
public class ManualSliderBody : SliderBody
|
||||
{
|
||||
public new void SetVertices(IReadOnlyList<Vector2> vertices)
|
||||
{
|
||||
base.SetVertices(vertices);
|
||||
Size = Path.Size;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user