mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 15:33:21 +08:00
Revert some usages based on review feedback
This commit is contained in:
parent
b51db90147
commit
f65991f31f
@ -7,7 +7,6 @@ using osu.Framework.Bindables;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Beatmaps.ControlPoints;
|
||||
using osu.Game.Overlays;
|
||||
|
||||
namespace osu.Game.Graphics.Containers
|
||||
{
|
||||
@ -15,9 +14,6 @@ namespace osu.Game.Graphics.Containers
|
||||
{
|
||||
protected readonly IBindable<WorkingBeatmap> Beatmap = new Bindable<WorkingBeatmap>();
|
||||
|
||||
[Resolved]
|
||||
private MusicController musicController { get; set; }
|
||||
|
||||
private int lastBeat;
|
||||
private TimingControlPoint lastTimingPoint;
|
||||
|
||||
@ -58,9 +54,9 @@ namespace osu.Game.Graphics.Containers
|
||||
TimingControlPoint timingPoint = null;
|
||||
EffectControlPoint effectPoint = null;
|
||||
|
||||
if (musicController.TrackLoaded && Beatmap.Value.BeatmapLoaded)
|
||||
if (Beatmap.Value.TrackLoaded && Beatmap.Value.BeatmapLoaded)
|
||||
{
|
||||
track = musicController.CurrentTrack;
|
||||
track = Beatmap.Value.Track;
|
||||
beatmap = Beatmap.Value.Beatmap;
|
||||
}
|
||||
|
||||
|
@ -30,9 +30,6 @@ namespace osu.Game.Overlays.Music
|
||||
[Resolved]
|
||||
private BeatmapManager beatmaps { get; set; }
|
||||
|
||||
[Resolved]
|
||||
private MusicController musicController { get; set; }
|
||||
|
||||
private FilterControl filter;
|
||||
private Playlist list;
|
||||
|
||||
@ -85,7 +82,7 @@ namespace osu.Game.Overlays.Music
|
||||
if (toSelect != null)
|
||||
{
|
||||
beatmap.Value = beatmaps.GetWorkingBeatmap(toSelect);
|
||||
musicController.CurrentTrack.Restart();
|
||||
beatmap.Value.Track.Restart();
|
||||
}
|
||||
};
|
||||
}
|
||||
@ -119,12 +116,12 @@ namespace osu.Game.Overlays.Music
|
||||
{
|
||||
if (set.ID == (beatmap.Value?.BeatmapSetInfo?.ID ?? -1))
|
||||
{
|
||||
musicController.CurrentTrack.Seek(0);
|
||||
beatmap.Value?.Track.Seek(0);
|
||||
return;
|
||||
}
|
||||
|
||||
beatmap.Value = beatmaps.GetWorkingBeatmap(set.Beatmaps.First());
|
||||
musicController.CurrentTrack.Restart();
|
||||
beatmap.Value.Track.Restart();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -11,7 +11,6 @@ using osu.Framework.Graphics.Audio;
|
||||
using osu.Framework.Input.Events;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Overlays;
|
||||
using osu.Game.Rulesets.Edit;
|
||||
using osuTK;
|
||||
|
||||
@ -27,9 +26,6 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
|
||||
[Resolved]
|
||||
private EditorClock editorClock { get; set; }
|
||||
|
||||
[Resolved]
|
||||
private MusicController musicController { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The timeline's scroll position in the last frame.
|
||||
/// </summary>
|
||||
|
@ -20,7 +20,6 @@ using osu.Framework.Audio;
|
||||
using osu.Framework.Audio.Track;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Utils;
|
||||
using osu.Game.Overlays;
|
||||
|
||||
namespace osu.Game.Screens.Menu
|
||||
{
|
||||
@ -75,9 +74,6 @@ namespace osu.Game.Screens.Menu
|
||||
/// </summary>
|
||||
public float Magnitude { get; set; } = 1;
|
||||
|
||||
[Resolved]
|
||||
private MusicController musicController { get; set; }
|
||||
|
||||
private readonly float[] frequencyAmplitudes = new float[256];
|
||||
|
||||
private IShader shader;
|
||||
@ -107,15 +103,15 @@ namespace osu.Game.Screens.Menu
|
||||
|
||||
private void updateAmplitudes()
|
||||
{
|
||||
var effect = beatmap.Value.BeatmapLoaded && musicController.TrackLoaded
|
||||
? beatmap.Value.Beatmap?.ControlPointInfo.EffectPointAt(musicController.CurrentTrack.CurrentTime)
|
||||
var effect = beatmap.Value.BeatmapLoaded && beatmap.Value.TrackLoaded
|
||||
? beatmap.Value.Beatmap?.ControlPointInfo.EffectPointAt(beatmap.Value.Track.CurrentTime)
|
||||
: null;
|
||||
|
||||
for (int i = 0; i < temporalAmplitudes.Length; i++)
|
||||
temporalAmplitudes[i] = 0;
|
||||
|
||||
if (musicController.TrackLoaded)
|
||||
addAmplitudesFromSource(musicController.CurrentTrack);
|
||||
if (beatmap.Value.TrackLoaded)
|
||||
addAmplitudesFromSource(beatmap.Value.Track);
|
||||
|
||||
foreach (var source in amplitudeSources)
|
||||
addAmplitudesFromSource(source);
|
||||
|
Loading…
Reference in New Issue
Block a user