mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 16:59:53 +09:00
Reduce implementation overhead in actually positioning hitobjects and making them scroll.
This commit is contained in:
@ -3,6 +3,7 @@
|
||||
|
||||
using System;
|
||||
using osu.Framework.Configuration;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Rulesets.Judgements;
|
||||
using osu.Game.Rulesets.Objects.Types;
|
||||
|
||||
@ -17,6 +18,19 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
||||
{
|
||||
public BindableDouble LifetimeOffset { get; } = new BindableDouble();
|
||||
|
||||
Axes IScrollingHitObject.ScrollingAxes
|
||||
{
|
||||
set
|
||||
{
|
||||
RelativePositionAxes = value;
|
||||
|
||||
if ((value & Axes.X) > 0)
|
||||
X = (float)HitObject.StartTime;
|
||||
if ((value & Axes.Y) > 0)
|
||||
Y = (float)HitObject.StartTime;
|
||||
}
|
||||
}
|
||||
|
||||
protected DrawableScrollingHitObject(TObject hitObject)
|
||||
: base(hitObject)
|
||||
{
|
||||
|
@ -9,7 +9,7 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
||||
/// <summary>
|
||||
/// An interface that exposes properties required for scrolling hit objects to be properly displayed.
|
||||
/// </summary>
|
||||
public interface IScrollingHitObject : IDrawable
|
||||
internal interface IScrollingHitObject : IDrawable
|
||||
{
|
||||
/// <summary>
|
||||
/// Time offset before the hit object start time at which this <see cref="IScrollingHitObject"/> becomes visible and the time offset
|
||||
@ -21,5 +21,11 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
||||
/// </para>
|
||||
/// </summary>
|
||||
BindableDouble LifetimeOffset { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Axes which this <see cref="IScrollingHitObject"/> will scroll through.
|
||||
/// This is set by the container which this scrolls through.
|
||||
/// </summary>
|
||||
Axes ScrollingAxes { set; }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user