Merge branch 'master' into no-more-difficulty-control-points-info

This commit is contained in:
Dean Herbert
2021-09-28 13:53:56 +09:00
307 changed files with 6952 additions and 2297 deletions

View File

@ -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);
}
}
}