mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 16:59:53 +09:00
Add bindables for IHasComboInformation properties
This commit is contained in:
@ -1,6 +1,7 @@
|
|||||||
// 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 osu.Framework.Bindables;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Beatmaps.ControlPoints;
|
using osu.Game.Beatmaps.ControlPoints;
|
||||||
using osu.Game.Rulesets.Catch.Beatmaps;
|
using osu.Game.Rulesets.Catch.Beatmaps;
|
||||||
@ -37,9 +38,21 @@ namespace osu.Game.Rulesets.Catch.Objects
|
|||||||
|
|
||||||
public int ComboOffset { get; set; }
|
public int ComboOffset { get; set; }
|
||||||
|
|
||||||
public int IndexInCurrentCombo { get; set; }
|
public Bindable<int> IndexInCurrentComboBindable { get; } = new Bindable<int>();
|
||||||
|
|
||||||
public int ComboIndex { get; set; }
|
public int IndexInCurrentCombo
|
||||||
|
{
|
||||||
|
get => IndexInCurrentComboBindable.Value;
|
||||||
|
set => IndexInCurrentComboBindable.Value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Bindable<int> ComboIndexBindable { get; } = new Bindable<int>();
|
||||||
|
|
||||||
|
public int ComboIndex
|
||||||
|
{
|
||||||
|
get => ComboIndexBindable.Value;
|
||||||
|
set => ComboIndexBindable.Value = value;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Difference between the distance to the next object
|
/// Difference between the distance to the next object
|
||||||
@ -48,10 +61,16 @@ namespace osu.Game.Rulesets.Catch.Objects
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public float DistanceToHyperDash { get; set; }
|
public float DistanceToHyperDash { get; set; }
|
||||||
|
|
||||||
|
public Bindable<bool> LastInComboBindable { get; } = new Bindable<bool>();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The next fruit starts a new combo. Used for explodey.
|
/// The next fruit starts a new combo. Used for explodey.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual bool LastInCombo { get; set; }
|
public virtual bool LastInCombo
|
||||||
|
{
|
||||||
|
get => LastInComboBindable.Value;
|
||||||
|
set => LastInComboBindable.Value = value;
|
||||||
|
}
|
||||||
|
|
||||||
public float Scale { get; set; } = 1;
|
public float Scale { get; set; } = 1;
|
||||||
|
|
||||||
|
@ -58,13 +58,37 @@ namespace osu.Game.Rulesets.Osu.Objects
|
|||||||
|
|
||||||
public virtual bool NewCombo { get; set; }
|
public virtual bool NewCombo { get; set; }
|
||||||
|
|
||||||
public int ComboOffset { get; set; }
|
public readonly Bindable<int> ComboOffsetBindable = new Bindable<int>();
|
||||||
|
|
||||||
public virtual int IndexInCurrentCombo { get; set; }
|
public int ComboOffset
|
||||||
|
{
|
||||||
|
get => ComboOffsetBindable.Value;
|
||||||
|
set => ComboOffsetBindable.Value = value;
|
||||||
|
}
|
||||||
|
|
||||||
public virtual int ComboIndex { get; set; }
|
public Bindable<int> IndexInCurrentComboBindable { get; } = new Bindable<int>();
|
||||||
|
|
||||||
public bool LastInCombo { get; set; }
|
public virtual int IndexInCurrentCombo
|
||||||
|
{
|
||||||
|
get => IndexInCurrentComboBindable.Value;
|
||||||
|
set => IndexInCurrentComboBindable.Value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Bindable<int> ComboIndexBindable { get; } = new Bindable<int>();
|
||||||
|
|
||||||
|
public virtual int ComboIndex
|
||||||
|
{
|
||||||
|
get => ComboIndexBindable.Value;
|
||||||
|
set => ComboIndexBindable.Value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Bindable<bool> LastInComboBindable { get; } = new Bindable<bool>();
|
||||||
|
|
||||||
|
public bool LastInCombo
|
||||||
|
{
|
||||||
|
get => LastInComboBindable.Value;
|
||||||
|
set => LastInComboBindable.Value = value;
|
||||||
|
}
|
||||||
|
|
||||||
protected override void ApplyDefaultsToSelf(ControlPointInfo controlPointInfo, BeatmapDifficulty difficulty)
|
protected override void ApplyDefaultsToSelf(ControlPointInfo controlPointInfo, BeatmapDifficulty difficulty)
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
// 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 osu.Framework.Bindables;
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Objects.Types
|
namespace osu.Game.Rulesets.Objects.Types
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -8,16 +10,22 @@ namespace osu.Game.Rulesets.Objects.Types
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IHasComboInformation : IHasCombo
|
public interface IHasComboInformation : IHasCombo
|
||||||
{
|
{
|
||||||
|
Bindable<int> IndexInCurrentComboBindable { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The offset of this hitobject in the current combo.
|
/// The offset of this hitobject in the current combo.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
int IndexInCurrentCombo { get; set; }
|
int IndexInCurrentCombo { get; set; }
|
||||||
|
|
||||||
|
Bindable<int> ComboIndexBindable { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The offset of this combo in relation to the beatmap.
|
/// The offset of this combo in relation to the beatmap.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
int ComboIndex { get; set; }
|
int ComboIndex { get; set; }
|
||||||
|
|
||||||
|
Bindable<bool> LastInComboBindable { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Whether this is the last object in the current combo.
|
/// Whether this is the last object in the current combo.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
Reference in New Issue
Block a user