mirror of
https://github.com/osukey/osukey.git
synced 2025-07-31 15:15:27 +09:00
Merge branch 'master' into controlpoint-rework
This commit is contained in:
Submodule osu-framework updated: 773d60eb6b...777996fb97
@ -12,20 +12,26 @@ namespace osu.Game.Graphics.Containers
|
|||||||
{
|
{
|
||||||
public class BeatSyncedContainer : Container
|
public class BeatSyncedContainer : Container
|
||||||
{
|
{
|
||||||
private readonly Bindable<WorkingBeatmap> beatmap = new Bindable<WorkingBeatmap>();
|
protected readonly Bindable<WorkingBeatmap> Beatmap = new Bindable<WorkingBeatmap>();
|
||||||
|
|
||||||
private int lastBeat;
|
private int lastBeat;
|
||||||
private TimingControlPoint lastTimingPoint;
|
private TimingControlPoint lastTimingPoint;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The amount of time before a beat we should fire <see cref="OnNewBeat(int, TimingControlPoint, EffectControlPoint, TrackAmplitudes)"/>.
|
||||||
|
/// This allows for adding easing to animations that may be synchronised to the beat.
|
||||||
|
/// </summary>
|
||||||
|
protected double EarlyActivationMilliseconds;
|
||||||
|
|
||||||
protected override void Update()
|
protected override void Update()
|
||||||
{
|
{
|
||||||
if (beatmap.Value?.Track == null)
|
if (Beatmap.Value?.Track == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
double currentTrackTime = beatmap.Value.Track.CurrentTime;
|
double currentTrackTime = Beatmap.Value.Track.CurrentTime + EarlyActivationMilliseconds;
|
||||||
|
|
||||||
TimingControlPoint timingPoint = beatmap.Value.Beatmap.ControlPointInfo.TimingPointAt(currentTrackTime);
|
TimingControlPoint timingPoint = Beatmap.Value.Beatmap.ControlPointInfo.TimingPointAt(currentTrackTime);
|
||||||
EffectControlPoint effectPoint = beatmap.Value.Beatmap.ControlPointInfo.EffectPointAt(currentTrackTime);
|
EffectControlPoint effectPoint = Beatmap.Value.Beatmap.ControlPointInfo.EffectPointAt(currentTrackTime);
|
||||||
|
|
||||||
if (timingPoint.BeatLength == 0)
|
if (timingPoint.BeatLength == 0)
|
||||||
return;
|
return;
|
||||||
@ -42,7 +48,7 @@ namespace osu.Game.Graphics.Containers
|
|||||||
double offsetFromBeat = (timingPoint.Time - currentTrackTime) % timingPoint.BeatLength;
|
double offsetFromBeat = (timingPoint.Time - currentTrackTime) % timingPoint.BeatLength;
|
||||||
|
|
||||||
using (BeginDelayedSequence(offsetFromBeat, true))
|
using (BeginDelayedSequence(offsetFromBeat, true))
|
||||||
OnNewBeat(beatIndex, timingPoint, effectPoint, beatmap.Value.Track.CurrentAmplitudes);
|
OnNewBeat(beatIndex, timingPoint, effectPoint, Beatmap.Value.Track.CurrentAmplitudes);
|
||||||
|
|
||||||
lastBeat = beatIndex;
|
lastBeat = beatIndex;
|
||||||
lastTimingPoint = timingPoint;
|
lastTimingPoint = timingPoint;
|
||||||
@ -51,7 +57,7 @@ namespace osu.Game.Graphics.Containers
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuGameBase game)
|
private void load(OsuGameBase game)
|
||||||
{
|
{
|
||||||
beatmap.BindTo(game.Beatmap);
|
Beatmap.BindTo(game.Beatmap);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual void OnNewBeat(int beatIndex, TimingControlPoint timingPoint, EffectControlPoint effectPoint, TrackAmplitudes amplitudes)
|
protected virtual void OnNewBeat(int beatIndex, TimingControlPoint timingPoint, EffectControlPoint effectPoint, TrackAmplitudes amplitudes)
|
||||||
|
@ -48,7 +48,8 @@ namespace osu.Game.Screens.Menu
|
|||||||
OnSolo = delegate { Push(consumeSongSelect()); },
|
OnSolo = delegate { Push(consumeSongSelect()); },
|
||||||
OnMulti = delegate { Push(new Lobby()); },
|
OnMulti = delegate { Push(new Lobby()); },
|
||||||
OnExit = delegate { Exit(); },
|
OnExit = delegate { Exit(); },
|
||||||
}
|
},
|
||||||
|
new MenuSideFlashes(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
96
osu.Game/Screens/Menu/MenuSideFlashes.cs
Normal file
96
osu.Game/Screens/Menu/MenuSideFlashes.cs
Normal file
@ -0,0 +1,96 @@
|
|||||||
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using OpenTK.Graphics;
|
||||||
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Framework.Audio.Track;
|
||||||
|
using osu.Framework.Configuration;
|
||||||
|
using osu.Framework.Extensions.Color4Extensions;
|
||||||
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Framework.Graphics.Colour;
|
||||||
|
using osu.Framework.Graphics.Sprites;
|
||||||
|
using osu.Game.Beatmaps;
|
||||||
|
using osu.Game.Beatmaps.ControlPoints;
|
||||||
|
using osu.Game.Graphics;
|
||||||
|
using osu.Game.Graphics.Containers;
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace osu.Game.Screens.Menu
|
||||||
|
{
|
||||||
|
public class MenuSideFlashes : BeatSyncedContainer
|
||||||
|
{
|
||||||
|
public override bool HandleInput => false;
|
||||||
|
|
||||||
|
private readonly Bindable<WorkingBeatmap> beatmap = new Bindable<WorkingBeatmap>();
|
||||||
|
|
||||||
|
private readonly Box leftBox;
|
||||||
|
private readonly Box rightBox;
|
||||||
|
|
||||||
|
private const float amplitude_dead_zone = 0.25f;
|
||||||
|
private const float alpha_multiplier = (1 - amplitude_dead_zone) / 0.55f;
|
||||||
|
private const float kiai_multiplier = (1 - amplitude_dead_zone * 0.95f) / 0.8f;
|
||||||
|
|
||||||
|
private const int box_max_alpha = 200;
|
||||||
|
private const double box_fade_in_time = 65;
|
||||||
|
private const int box_width = 200;
|
||||||
|
|
||||||
|
public MenuSideFlashes()
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.Both;
|
||||||
|
Anchor = Anchor.Centre;
|
||||||
|
Origin = Anchor.Centre;
|
||||||
|
Children = new Drawable[]
|
||||||
|
{
|
||||||
|
leftBox = new Box
|
||||||
|
{
|
||||||
|
Anchor = Anchor.CentreLeft,
|
||||||
|
Origin = Anchor.CentreLeft,
|
||||||
|
RelativeSizeAxes = Axes.Y,
|
||||||
|
Width = box_width,
|
||||||
|
Alpha = 0,
|
||||||
|
BlendingMode = BlendingMode.Additive,
|
||||||
|
},
|
||||||
|
rightBox = new Box
|
||||||
|
{
|
||||||
|
Anchor = Anchor.CentreRight,
|
||||||
|
Origin = Anchor.CentreRight,
|
||||||
|
RelativeSizeAxes = Axes.Y,
|
||||||
|
Width = box_width,
|
||||||
|
Alpha = 0,
|
||||||
|
BlendingMode = BlendingMode.Additive,
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
[BackgroundDependencyLoader]
|
||||||
|
private void load(OsuGameBase game, OsuColour colours)
|
||||||
|
{
|
||||||
|
beatmap.BindTo(game.Beatmap);
|
||||||
|
|
||||||
|
// linear colour looks better in this case, so let's use it for now.
|
||||||
|
Color4 gradientDark = colours.Blue.Opacity(0).ToLinear();
|
||||||
|
Color4 gradientLight = colours.Blue.Opacity(0.3f).ToLinear();
|
||||||
|
|
||||||
|
leftBox.ColourInfo = ColourInfo.GradientHorizontal(gradientLight, gradientDark);
|
||||||
|
rightBox.ColourInfo = ColourInfo.GradientHorizontal(gradientDark, gradientLight);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnNewBeat(int beatIndex, TimingControlPoint timingPoint, EffectControlPoint effectPoint, TrackAmplitudes amplitudes)
|
||||||
|
{
|
||||||
|
if (beatIndex < 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (effectPoint.KiaiMode ? beatIndex % 2 == 0 : beatIndex % (int)timingPoint.TimeSignature == 0)
|
||||||
|
flash(leftBox, timingPoint.BeatLength, effectPoint.KiaiMode, amplitudes);
|
||||||
|
if (effectPoint.KiaiMode ? beatIndex % 2 == 1 : beatIndex % (int)timingPoint.TimeSignature == 0)
|
||||||
|
flash(rightBox, timingPoint.BeatLength, effectPoint.KiaiMode, amplitudes);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void flash(Drawable d, double beatLength, bool kiai, TrackAmplitudes amplitudes)
|
||||||
|
{
|
||||||
|
d.FadeTo(Math.Max(0, ((d.Equals(leftBox) ? amplitudes.LeftChannel : amplitudes.RightChannel) - amplitude_dead_zone) / (kiai ? kiai_multiplier : alpha_multiplier)), box_fade_in_time);
|
||||||
|
using (d.BeginDelayedSequence(box_fade_in_time))
|
||||||
|
d.FadeOut(beatLength, EasingTypes.In);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -5,13 +5,16 @@ using System;
|
|||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Audio;
|
using osu.Framework.Audio;
|
||||||
using osu.Framework.Audio.Sample;
|
using osu.Framework.Audio.Sample;
|
||||||
|
using osu.Framework.Audio.Track;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
using osu.Framework.Graphics.Textures;
|
using osu.Framework.Graphics.Textures;
|
||||||
using osu.Framework.Input;
|
using osu.Framework.Input;
|
||||||
|
using osu.Game.Beatmaps.ControlPoints;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Graphics.Backgrounds;
|
using osu.Game.Graphics.Backgrounds;
|
||||||
|
using osu.Game.Graphics.Containers;
|
||||||
using OpenTK;
|
using OpenTK;
|
||||||
using OpenTK.Graphics;
|
using OpenTK.Graphics;
|
||||||
|
|
||||||
@ -20,13 +23,15 @@ namespace osu.Game.Screens.Menu
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// osu! logo and its attachments (pulsing, visualiser etc.)
|
/// osu! logo and its attachments (pulsing, visualiser etc.)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class OsuLogo : Container
|
public class OsuLogo : BeatSyncedContainer
|
||||||
{
|
{
|
||||||
public readonly Color4 OsuPink = OsuColour.FromHex(@"e967a1");
|
public readonly Color4 OsuPink = OsuColour.FromHex(@"e967a1");
|
||||||
|
|
||||||
private readonly Sprite logo;
|
private readonly Sprite logo;
|
||||||
private readonly CircularContainer logoContainer;
|
private readonly CircularContainer logoContainer;
|
||||||
private readonly Container logoBounceContainer;
|
private readonly Container logoBounceContainer;
|
||||||
|
private readonly Container logoBeatContainer;
|
||||||
|
private readonly Container logoAmplitudeContainer;
|
||||||
private readonly Container logoHoverContainer;
|
private readonly Container logoHoverContainer;
|
||||||
|
|
||||||
private SampleChannel sampleClick;
|
private SampleChannel sampleClick;
|
||||||
@ -67,8 +72,12 @@ namespace osu.Game.Screens.Menu
|
|||||||
|
|
||||||
private const float default_size = 480;
|
private const float default_size = 480;
|
||||||
|
|
||||||
|
private const double beat_in_time = 60;
|
||||||
|
|
||||||
public OsuLogo()
|
public OsuLogo()
|
||||||
{
|
{
|
||||||
|
EarlyActivationMilliseconds = beat_in_time;
|
||||||
|
|
||||||
Size = new Vector2(default_size);
|
Size = new Vector2(default_size);
|
||||||
|
|
||||||
Anchor = Anchor.Centre;
|
Anchor = Anchor.Centre;
|
||||||
@ -78,67 +87,16 @@ namespace osu.Game.Screens.Menu
|
|||||||
|
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
logoBounceContainer = new Container
|
logoHoverContainer = new Container
|
||||||
{
|
{
|
||||||
AutoSizeAxes = Axes.Both,
|
AutoSizeAxes = Axes.Both,
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
logoHoverContainer = new Container
|
logoBounceContainer = new Container
|
||||||
{
|
{
|
||||||
AutoSizeAxes = Axes.Both,
|
AutoSizeAxes = Axes.Both,
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new BufferedContainer
|
|
||||||
{
|
|
||||||
AutoSizeAxes = Axes.Both,
|
|
||||||
Children = new Drawable[]
|
|
||||||
{
|
|
||||||
logoContainer = new CircularContainer
|
|
||||||
{
|
|
||||||
Anchor = Anchor.Centre,
|
|
||||||
Origin = Anchor.Centre,
|
|
||||||
RelativeSizeAxes = Axes.Both,
|
|
||||||
Scale = new Vector2(0.88f),
|
|
||||||
Masking = true,
|
|
||||||
Children = new Drawable[]
|
|
||||||
{
|
|
||||||
colourAndTriangles = new Container
|
|
||||||
{
|
|
||||||
RelativeSizeAxes = Axes.Both,
|
|
||||||
Anchor = Anchor.Centre,
|
|
||||||
Origin = Anchor.Centre,
|
|
||||||
Children = new Drawable[]
|
|
||||||
{
|
|
||||||
new Box
|
|
||||||
{
|
|
||||||
RelativeSizeAxes = Axes.Both,
|
|
||||||
Colour = OsuPink,
|
|
||||||
},
|
|
||||||
new Triangles
|
|
||||||
{
|
|
||||||
TriangleScale = 4,
|
|
||||||
ColourLight = OsuColour.FromHex(@"ff7db7"),
|
|
||||||
ColourDark = OsuColour.FromHex(@"de5b95"),
|
|
||||||
RelativeSizeAxes = Axes.Both,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
flashLayer = new Box
|
|
||||||
{
|
|
||||||
RelativeSizeAxes = Axes.Both,
|
|
||||||
BlendingMode = BlendingMode.Additive,
|
|
||||||
Colour = Color4.White,
|
|
||||||
Alpha = 0,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
logo = new Sprite
|
|
||||||
{
|
|
||||||
Anchor = Anchor.Centre,
|
|
||||||
Origin = Anchor.Centre,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
rippleContainer = new Container
|
rippleContainer = new Container
|
||||||
{
|
{
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
@ -151,36 +109,101 @@ namespace osu.Game.Screens.Menu
|
|||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
BlendingMode = BlendingMode.Additive,
|
BlendingMode = BlendingMode.Additive,
|
||||||
Alpha = 0.15f
|
Alpha = 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
impactContainer = new CircularContainer
|
logoAmplitudeContainer = new Container
|
||||||
{
|
{
|
||||||
Anchor = Anchor.Centre,
|
AutoSizeAxes = Axes.Both,
|
||||||
Origin = Anchor.Centre,
|
|
||||||
Alpha = 0,
|
|
||||||
BorderColour = Color4.White,
|
|
||||||
RelativeSizeAxes = Axes.Both,
|
|
||||||
BorderThickness = 10,
|
|
||||||
Masking = true,
|
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new Box
|
logoBeatContainer = new Container
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
AutoSizeAxes = Axes.Both,
|
||||||
AlwaysPresent = true,
|
Children = new Drawable[]
|
||||||
Alpha = 0,
|
{
|
||||||
|
new BufferedContainer
|
||||||
|
{
|
||||||
|
AutoSizeAxes = Axes.Both,
|
||||||
|
Children = new Drawable[]
|
||||||
|
{
|
||||||
|
logoContainer = new CircularContainer
|
||||||
|
{
|
||||||
|
Anchor = Anchor.Centre,
|
||||||
|
Origin = Anchor.Centre,
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Scale = new Vector2(0.88f),
|
||||||
|
Masking = true,
|
||||||
|
Children = new Drawable[]
|
||||||
|
{
|
||||||
|
colourAndTriangles = new Container
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Anchor = Anchor.Centre,
|
||||||
|
Origin = Anchor.Centre,
|
||||||
|
Children = new Drawable[]
|
||||||
|
{
|
||||||
|
new Box
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Colour = OsuPink,
|
||||||
|
},
|
||||||
|
new Triangles
|
||||||
|
{
|
||||||
|
TriangleScale = 4,
|
||||||
|
ColourLight = OsuColour.FromHex(@"ff7db7"),
|
||||||
|
ColourDark = OsuColour.FromHex(@"de5b95"),
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
flashLayer = new Box
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
BlendingMode = BlendingMode.Additive,
|
||||||
|
Colour = Color4.White,
|
||||||
|
Alpha = 0,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
logo = new Sprite
|
||||||
|
{
|
||||||
|
Anchor = Anchor.Centre,
|
||||||
|
Origin = Anchor.Centre,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
impactContainer = new CircularContainer
|
||||||
|
{
|
||||||
|
Anchor = Anchor.Centre,
|
||||||
|
Origin = Anchor.Centre,
|
||||||
|
Alpha = 0,
|
||||||
|
BorderColour = Color4.White,
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
BorderThickness = 10,
|
||||||
|
Masking = true,
|
||||||
|
Children = new Drawable[]
|
||||||
|
{
|
||||||
|
new Box
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
AlwaysPresent = true,
|
||||||
|
Alpha = 0,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
new MenuVisualisation
|
||||||
|
{
|
||||||
|
Anchor = Anchor.Centre,
|
||||||
|
Origin = Anchor.Centre,
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
BlendingMode = BlendingMode.Additive,
|
||||||
|
Alpha = 0.2f,
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
new MenuVisualisation
|
|
||||||
{
|
|
||||||
Anchor = Anchor.Centre,
|
|
||||||
Origin = Anchor.Centre,
|
|
||||||
RelativeSizeAxes = Axes.Both,
|
|
||||||
BlendingMode = BlendingMode.Additive,
|
|
||||||
Alpha = 0.2f,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -197,13 +220,48 @@ namespace osu.Game.Screens.Menu
|
|||||||
ripple.Texture = textures.Get(@"Menu/logo");
|
ripple.Texture = textures.Get(@"Menu/logo");
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void LoadComplete()
|
private int lastBeatIndex;
|
||||||
{
|
|
||||||
base.LoadComplete();
|
|
||||||
|
|
||||||
ripple.ScaleTo(ripple.Scale * 1.1f, 500);
|
protected override void OnNewBeat(int beatIndex, TimingControlPoint timingPoint, EffectControlPoint effectPoint, TrackAmplitudes amplitudes)
|
||||||
ripple.FadeOut(500);
|
{
|
||||||
ripple.Loop(300);
|
base.OnNewBeat(beatIndex, timingPoint, effectPoint, amplitudes);
|
||||||
|
|
||||||
|
lastBeatIndex = beatIndex;
|
||||||
|
|
||||||
|
var beatLength = timingPoint.BeatLength;
|
||||||
|
|
||||||
|
float amplitudeAdjust = Math.Min(1, 0.4f + amplitudes.Maximum);
|
||||||
|
|
||||||
|
if (beatIndex < 0) return;
|
||||||
|
|
||||||
|
logoBeatContainer.ScaleTo(1 - 0.02f * amplitudeAdjust, beat_in_time, EasingTypes.Out);
|
||||||
|
using (logoBeatContainer.BeginDelayedSequence(beat_in_time))
|
||||||
|
logoBeatContainer.ScaleTo(1, beatLength * 2, EasingTypes.OutQuint);
|
||||||
|
|
||||||
|
ripple.ClearTransforms();
|
||||||
|
|
||||||
|
ripple.ScaleTo(logoAmplitudeContainer.Scale);
|
||||||
|
ripple.Alpha = 0.15f * amplitudeAdjust;
|
||||||
|
|
||||||
|
ripple.ScaleTo(logoAmplitudeContainer.Scale * (1 + 0.04f * amplitudeAdjust), beatLength, EasingTypes.OutQuint);
|
||||||
|
ripple.FadeOut(beatLength, EasingTypes.OutQuint);
|
||||||
|
|
||||||
|
if (effectPoint.KiaiMode && flashLayer.Alpha < 0.4f)
|
||||||
|
{
|
||||||
|
flashLayer.ClearTransforms();
|
||||||
|
|
||||||
|
flashLayer.FadeTo(0.2f * amplitudeAdjust, beat_in_time, EasingTypes.Out);
|
||||||
|
using (flashLayer.BeginDelayedSequence(beat_in_time))
|
||||||
|
flashLayer.FadeOut(beatLength);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Update()
|
||||||
|
{
|
||||||
|
base.Update();
|
||||||
|
|
||||||
|
var maxAmplitude = lastBeatIndex >= 0 ? Beatmap.Value?.Track?.CurrentAmplitudes.Maximum ?? 0 : 0;
|
||||||
|
logoAmplitudeContainer.ScaleTo(1 - maxAmplitude * 0.04f, 50, EasingTypes.OutQuint);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args)
|
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args)
|
||||||
@ -254,4 +312,4 @@ namespace osu.Game.Screens.Menu
|
|||||||
impactContainer.ScaleTo(1.12f, 250);
|
impactContainer.ScaleTo(1.12f, 250);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -170,8 +170,8 @@ namespace osu.Game.Screens.Select
|
|||||||
List<BeatmapGroup> visibleGroups = groups.Where(selectGroup => selectGroup.State != BeatmapGroupState.Hidden).ToList();
|
List<BeatmapGroup> visibleGroups = groups.Where(selectGroup => selectGroup.State != BeatmapGroupState.Hidden).ToList();
|
||||||
if (visibleGroups.Count < 1)
|
if (visibleGroups.Count < 1)
|
||||||
return;
|
return;
|
||||||
BeatmapGroup group = visibleGroups[RNG.Next(visibleGroups.Count)];
|
|
||||||
|
|
||||||
|
BeatmapGroup group = visibleGroups[RNG.Next(visibleGroups.Count)];
|
||||||
BeatmapPanel panel = group.BeatmapPanels[RNG.Next(group.BeatmapPanels.Count)];
|
BeatmapPanel panel = group.BeatmapPanels[RNG.Next(group.BeatmapPanels.Count)];
|
||||||
|
|
||||||
selectGroup(group, panel);
|
selectGroup(group, panel);
|
||||||
|
@ -316,11 +316,12 @@ namespace osu.Game.Screens.Select
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void selectionChanged(BeatmapInfo beatmap)
|
private void selectionChanged(BeatmapInfo beatmap)
|
||||||
{
|
{
|
||||||
bool beatmapSetChange = false;
|
selectionChangedDebounce?.Cancel();
|
||||||
|
|
||||||
if (beatmap.Equals(Beatmap?.BeatmapInfo))
|
if (beatmap.Equals(Beatmap?.BeatmapInfo))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
bool beatmapSetChange = false;
|
||||||
if (beatmap.BeatmapSetInfoID == selectionChangeNoBounce?.BeatmapSetInfoID)
|
if (beatmap.BeatmapSetInfoID == selectionChangeNoBounce?.BeatmapSetInfoID)
|
||||||
sampleChangeDifficulty.Play();
|
sampleChangeDifficulty.Play();
|
||||||
else
|
else
|
||||||
@ -331,7 +332,6 @@ namespace osu.Game.Screens.Select
|
|||||||
|
|
||||||
selectionChangeNoBounce = beatmap;
|
selectionChangeNoBounce = beatmap;
|
||||||
|
|
||||||
selectionChangedDebounce?.Cancel();
|
|
||||||
selectionChangedDebounce = Scheduler.AddDelayed(delegate
|
selectionChangedDebounce = Scheduler.AddDelayed(delegate
|
||||||
{
|
{
|
||||||
Beatmap = database.GetWorkingBeatmap(beatmap, Beatmap);
|
Beatmap = database.GetWorkingBeatmap(beatmap, Beatmap);
|
||||||
|
@ -189,6 +189,7 @@
|
|||||||
<Compile Include="Database\RulesetDatabase.cs" />
|
<Compile Include="Database\RulesetDatabase.cs" />
|
||||||
<Compile Include="Rulesets\Scoring\Score.cs" />
|
<Compile Include="Rulesets\Scoring\Score.cs" />
|
||||||
<Compile Include="Rulesets\Scoring\ScoreProcessor.cs" />
|
<Compile Include="Rulesets\Scoring\ScoreProcessor.cs" />
|
||||||
|
<Compile Include="Screens\Menu\MenuSideFlashes.cs" />
|
||||||
<Compile Include="Screens\Play\HUD\HealthDisplay.cs" />
|
<Compile Include="Screens\Play\HUD\HealthDisplay.cs" />
|
||||||
<Compile Include="Screens\Play\HUDOverlay.cs" />
|
<Compile Include="Screens\Play\HUDOverlay.cs" />
|
||||||
<Compile Include="Screens\Play\HUD\StandardHealthDisplay.cs" />
|
<Compile Include="Screens\Play\HUD\StandardHealthDisplay.cs" />
|
||||||
|
Reference in New Issue
Block a user