mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 22:56:36 +09:00
Merge branch 'master' into no-more-difficulty-control-points-info
This commit is contained in:
@ -3,11 +3,12 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using JetBrains.Annotations;
|
||||
using Newtonsoft.Json;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Extensions.ListExtensions;
|
||||
using osu.Framework.Lists;
|
||||
using osu.Game.Audio;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Beatmaps.ControlPoints;
|
||||
@ -84,7 +85,7 @@ namespace osu.Game.Rulesets.Objects
|
||||
private readonly List<HitObject> nestedHitObjects = new List<HitObject>();
|
||||
|
||||
[JsonIgnore]
|
||||
public IReadOnlyList<HitObject> NestedHitObjects => nestedHitObjects;
|
||||
public SlimReadOnlyListWrapper<HitObject> NestedHitObjects => nestedHitObjects.AsSlimReadOnly();
|
||||
|
||||
public HitObject()
|
||||
{
|
||||
@ -92,7 +93,7 @@ namespace osu.Game.Rulesets.Objects
|
||||
{
|
||||
double offset = time.NewValue - time.OldValue;
|
||||
|
||||
foreach (var nested in NestedHitObjects)
|
||||
foreach (var nested in nestedHitObjects)
|
||||
nested.StartTime += offset;
|
||||
|
||||
if (DifficultyControlPoint != DifficultyControlPoint.DEFAULT)
|
||||
@ -134,11 +135,14 @@ namespace osu.Game.Rulesets.Objects
|
||||
|
||||
if (this is IHasComboInformation hasCombo)
|
||||
{
|
||||
foreach (var n in NestedHitObjects.OfType<IHasComboInformation>())
|
||||
foreach (HitObject hitObject in nestedHitObjects)
|
||||
{
|
||||
n.ComboIndexBindable.BindTo(hasCombo.ComboIndexBindable);
|
||||
n.ComboIndexWithOffsetsBindable.BindTo(hasCombo.ComboIndexWithOffsetsBindable);
|
||||
n.IndexInCurrentComboBindable.BindTo(hasCombo.IndexInCurrentComboBindable);
|
||||
if (hitObject is IHasComboInformation n)
|
||||
{
|
||||
n.ComboIndexBindable.BindTo(hasCombo.ComboIndexBindable);
|
||||
n.ComboIndexWithOffsetsBindable.BindTo(hasCombo.ComboIndexWithOffsetsBindable);
|
||||
n.IndexInCurrentComboBindable.BindTo(hasCombo.IndexInCurrentComboBindable);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user