mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 22:56:36 +09:00
Move track to MusicController, compiles
This commit is contained in:
@ -17,6 +17,7 @@ using osu.Framework.Utils;
|
||||
using osu.Game.Beatmaps.ControlPoints;
|
||||
using osu.Game.Graphics.Backgrounds;
|
||||
using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Overlays;
|
||||
using osuTK;
|
||||
using osuTK.Graphics;
|
||||
using osuTK.Input;
|
||||
@ -46,7 +47,6 @@ namespace osu.Game.Screens.Menu
|
||||
private SampleChannel sampleBeat;
|
||||
|
||||
private readonly Container colourAndTriangles;
|
||||
|
||||
private readonly Triangles triangles;
|
||||
|
||||
/// <summary>
|
||||
@ -319,6 +319,9 @@ namespace osu.Game.Screens.Menu
|
||||
intro.Delay(length + fade).FadeOut();
|
||||
}
|
||||
|
||||
[Resolved]
|
||||
private MusicController musicController { get; set; }
|
||||
|
||||
protected override void Update()
|
||||
{
|
||||
base.Update();
|
||||
@ -327,9 +330,9 @@ namespace osu.Game.Screens.Menu
|
||||
const float velocity_adjust_cutoff = 0.98f;
|
||||
const float paused_velocity = 0.5f;
|
||||
|
||||
if (Beatmap.Value.Track.IsRunning)
|
||||
if (musicController.IsPlaying)
|
||||
{
|
||||
var maxAmplitude = lastBeatIndex >= 0 ? Beatmap.Value.Track.CurrentAmplitudes.Maximum : 0;
|
||||
var maxAmplitude = lastBeatIndex >= 0 ? musicController.CurrentAmplitudes.Maximum : 0;
|
||||
logoAmplitudeContainer.Scale = new Vector2((float)Interpolation.Damp(logoAmplitudeContainer.Scale.X, 1 - Math.Max(0, maxAmplitude - scale_adjust_cutoff) * 0.04f, 0.9f, Time.Elapsed));
|
||||
|
||||
if (maxAmplitude > velocity_adjust_cutoff)
|
||||
|
Reference in New Issue
Block a user