2017-02-07 13:59:30 +09:00
|
|
|
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
|
|
|
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
2016-09-29 20:13:58 +09:00
|
|
|
|
|
2017-03-10 11:59:08 +09:00
|
|
|
|
using OpenTK;
|
2016-11-08 18:13:20 -05:00
|
|
|
|
using osu.Framework.Allocation;
|
|
|
|
|
using osu.Framework.Audio;
|
2016-11-14 17:23:33 +09:00
|
|
|
|
using osu.Framework.Audio.Track;
|
2017-03-10 11:59:08 +09:00
|
|
|
|
using osu.Framework.Configuration;
|
2016-11-14 17:23:33 +09:00
|
|
|
|
using osu.Framework.Graphics;
|
2017-03-10 11:59:08 +09:00
|
|
|
|
using osu.Framework.Graphics.Containers;
|
|
|
|
|
using osu.Framework.Input;
|
|
|
|
|
using osu.Framework.Logging;
|
|
|
|
|
using osu.Framework.Screens;
|
2016-11-14 17:23:33 +09:00
|
|
|
|
using osu.Framework.Timing;
|
2017-03-10 11:59:08 +09:00
|
|
|
|
using osu.Game.Configuration;
|
2016-11-14 17:23:33 +09:00
|
|
|
|
using osu.Game.Database;
|
2017-04-18 16:05:58 +09:00
|
|
|
|
using osu.Game.Rulesets;
|
|
|
|
|
using osu.Game.Rulesets.UI;
|
2017-03-10 11:59:08 +09:00
|
|
|
|
using osu.Game.Screens.Backgrounds;
|
2016-12-17 20:59:41 +01:00
|
|
|
|
using System;
|
2017-01-27 21:57:22 +09:00
|
|
|
|
using System.Linq;
|
2017-04-07 16:55:41 +09:00
|
|
|
|
using osu.Framework.Threading;
|
2017-04-21 17:33:20 +09:00
|
|
|
|
using osu.Game.Rulesets.Mods;
|
2017-04-18 16:05:58 +09:00
|
|
|
|
using osu.Game.Rulesets.Scoring;
|
2017-04-11 14:01:13 +09:00
|
|
|
|
using osu.Game.Screens.Ranking;
|
2017-06-28 10:19:04 -07:00
|
|
|
|
using osu.Framework.Audio.Sample;
|
2016-09-29 20:13:58 +09:00
|
|
|
|
|
2016-11-14 17:23:33 +09:00
|
|
|
|
namespace osu.Game.Screens.Play
|
2016-09-29 20:13:58 +09:00
|
|
|
|
{
|
2017-02-17 18:59:30 +09:00
|
|
|
|
public class Player : OsuScreen
|
2016-09-29 20:13:58 +09:00
|
|
|
|
{
|
2017-02-17 18:59:30 +09:00
|
|
|
|
protected override BackgroundScreen CreateBackground() => new BackgroundScreenBeatmap(Beatmap);
|
2016-10-05 20:03:52 +09:00
|
|
|
|
|
2016-11-15 20:43:43 +09:00
|
|
|
|
internal override bool ShowOverlays => false;
|
2016-11-09 15:22:54 +09:00
|
|
|
|
|
2017-05-17 21:57:01 +09:00
|
|
|
|
internal override bool HasLocalCursorDisplayed => !pauseContainer.IsPaused && !HasFailed && HitRenderer.ProvidingUserCursor;
|
2017-03-16 23:58:36 +09:00
|
|
|
|
|
2016-10-27 17:53:37 +09:00
|
|
|
|
public BeatmapInfo BeatmapInfo;
|
2016-10-19 18:00:35 +09:00
|
|
|
|
|
2017-04-18 16:56:01 +09:00
|
|
|
|
public Action RestartRequested;
|
2017-04-17 21:30:51 -07:00
|
|
|
|
|
2017-04-21 16:03:59 +09:00
|
|
|
|
internal override bool AllowRulesetChange => false;
|
|
|
|
|
|
2017-04-01 21:17:24 +03:00
|
|
|
|
public bool HasFailed { get; private set; }
|
2017-03-28 04:53:57 +03:00
|
|
|
|
|
2017-01-30 04:08:14 -04:00
|
|
|
|
public int RestartCount;
|
2017-01-27 15:28:39 -04:00
|
|
|
|
|
2017-04-26 18:16:55 +09:00
|
|
|
|
private IAdjustableClock adjustableSourceClock;
|
|
|
|
|
private FramedOffsetClock offsetClock;
|
|
|
|
|
private DecoupleableInterpolatingFramedClock decoupledClock;
|
2016-11-16 15:48:35 +09:00
|
|
|
|
|
2017-05-17 21:57:01 +09:00
|
|
|
|
private PauseContainer pauseContainer;
|
|
|
|
|
|
2017-04-20 11:16:08 +09:00
|
|
|
|
private RulesetInfo ruleset;
|
2016-10-28 14:14:45 +09:00
|
|
|
|
|
2016-11-29 20:30:16 +09:00
|
|
|
|
private ScoreProcessor scoreProcessor;
|
2017-03-31 15:59:53 +09:00
|
|
|
|
protected HitRenderer HitRenderer;
|
2017-04-21 16:19:40 +09:00
|
|
|
|
|
|
|
|
|
#region User Settings
|
|
|
|
|
|
2017-04-20 14:43:30 +02:00
|
|
|
|
private Bindable<double> dimLevel;
|
2017-04-21 16:19:40 +09:00
|
|
|
|
private Bindable<bool> mouseWheelDisabled;
|
|
|
|
|
private Bindable<double> userAudioOffset;
|
|
|
|
|
|
2017-06-28 10:19:04 -07:00
|
|
|
|
private SampleChannel sampleRestart;
|
|
|
|
|
|
2017-04-21 16:19:40 +09:00
|
|
|
|
#endregion
|
|
|
|
|
|
2017-05-05 13:00:05 +09:00
|
|
|
|
private HUDOverlay hudOverlay;
|
2017-03-28 10:49:58 +03:00
|
|
|
|
private FailOverlay failOverlay;
|
2017-01-27 15:28:39 -04:00
|
|
|
|
|
2017-04-17 15:44:46 +09:00
|
|
|
|
[BackgroundDependencyLoader(permitNulls: true)]
|
|
|
|
|
private void load(AudioManager audio, BeatmapDatabase beatmaps, OsuConfigManager config, OsuGame osu)
|
2016-10-05 20:49:31 +09:00
|
|
|
|
{
|
2017-05-15 10:56:27 +09:00
|
|
|
|
dimLevel = config.GetBindable<double>(OsuSetting.DimLevel);
|
|
|
|
|
mouseWheelDisabled = config.GetBindable<bool>(OsuSetting.MouseDisableWheel);
|
2017-02-28 11:44:12 +01:00
|
|
|
|
|
2017-06-28 10:19:04 -07:00
|
|
|
|
sampleRestart = audio.Sample.Get(@"Gameplay/restart");
|
|
|
|
|
|
2017-04-20 11:16:08 +09:00
|
|
|
|
Ruleset rulesetInstance;
|
|
|
|
|
|
2016-10-27 20:37:01 +09:00
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
if (Beatmap == null)
|
2017-02-09 15:09:48 +01:00
|
|
|
|
Beatmap = beatmaps.GetWorkingBeatmap(BeatmapInfo, withStoryboard: true);
|
2017-02-15 12:38:10 +09:00
|
|
|
|
|
2017-04-26 18:32:40 +09:00
|
|
|
|
if (Beatmap?.Beatmap == null)
|
2017-05-07 00:38:17 +08:00
|
|
|
|
throw new InvalidOperationException("Beatmap was not loaded");
|
2017-04-17 15:44:46 +09:00
|
|
|
|
|
2017-04-20 11:36:50 +09:00
|
|
|
|
ruleset = osu?.Ruleset.Value ?? Beatmap.BeatmapInfo.Ruleset;
|
|
|
|
|
rulesetInstance = ruleset.CreateInstance();
|
|
|
|
|
|
2017-04-17 15:44:46 +09:00
|
|
|
|
try
|
|
|
|
|
{
|
2017-05-19 16:31:05 +09:00
|
|
|
|
HitRenderer = rulesetInstance.CreateHitRendererWith(Beatmap, ruleset.ID == Beatmap.BeatmapInfo.Ruleset.ID);
|
2017-04-17 15:44:46 +09:00
|
|
|
|
}
|
2017-04-20 12:11:03 +09:00
|
|
|
|
catch (BeatmapInvalidForRulesetException)
|
2017-04-17 15:44:46 +09:00
|
|
|
|
{
|
2017-04-20 11:36:50 +09:00
|
|
|
|
// we may fail to create a HitRenderer if the beatmap cannot be loaded with the user's preferred ruleset
|
|
|
|
|
// let's try again forcing the beatmap's ruleset.
|
2017-04-20 11:16:08 +09:00
|
|
|
|
ruleset = Beatmap.BeatmapInfo.Ruleset;
|
2017-04-20 11:36:50 +09:00
|
|
|
|
rulesetInstance = ruleset.CreateInstance();
|
2017-05-19 15:57:32 +09:00
|
|
|
|
HitRenderer = rulesetInstance.CreateHitRendererWith(Beatmap, true);
|
2017-04-17 15:44:46 +09:00
|
|
|
|
}
|
2017-04-26 20:22:03 +09:00
|
|
|
|
|
|
|
|
|
if (!HitRenderer.Objects.Any())
|
2017-05-07 00:38:17 +08:00
|
|
|
|
throw new InvalidOperationException("Beatmap contains no hit objects!");
|
2016-10-27 20:37:01 +09:00
|
|
|
|
}
|
2017-02-15 12:38:10 +09:00
|
|
|
|
catch (Exception e)
|
2016-10-27 20:37:01 +09:00
|
|
|
|
{
|
2017-02-15 12:38:10 +09:00
|
|
|
|
Logger.Log($"Could not load this beatmap sucessfully ({e})!", LoggingTarget.Runtime, LogLevel.Error);
|
|
|
|
|
|
2016-10-27 20:37:01 +09:00
|
|
|
|
//couldn't load, hard abort!
|
|
|
|
|
Exit();
|
|
|
|
|
return;
|
|
|
|
|
}
|
2016-10-05 20:49:31 +09:00
|
|
|
|
|
2017-02-18 17:35:04 +09:00
|
|
|
|
Track track = Beatmap.Track;
|
2016-10-28 14:14:45 +09:00
|
|
|
|
|
|
|
|
|
if (track != null)
|
|
|
|
|
{
|
2016-11-08 18:13:20 -05:00
|
|
|
|
audio.Track.SetExclusive(track);
|
2017-04-26 18:16:55 +09:00
|
|
|
|
adjustableSourceClock = track;
|
2016-10-28 14:14:45 +09:00
|
|
|
|
}
|
|
|
|
|
|
2017-04-26 18:16:55 +09:00
|
|
|
|
adjustableSourceClock = (IAdjustableClock)track ?? new StopwatchClock();
|
|
|
|
|
|
2017-04-26 18:32:47 +09:00
|
|
|
|
decoupledClock = new DecoupleableInterpolatingFramedClock { IsCoupled = false };
|
2017-04-26 18:16:55 +09:00
|
|
|
|
|
2017-04-26 18:07:22 +09:00
|
|
|
|
var firstObjectTime = HitRenderer.Objects.First().StartTime;
|
2017-05-23 13:55:18 +09:00
|
|
|
|
decoupledClock.Seek(Math.Min(0, firstObjectTime - Math.Max(Beatmap.Beatmap.ControlPointInfo.TimingPointAt(firstObjectTime).BeatLength * 4, Beatmap.BeatmapInfo.AudioLeadIn)));
|
2017-04-26 18:07:22 +09:00
|
|
|
|
decoupledClock.ProcessFrame();
|
|
|
|
|
|
2017-04-26 18:16:55 +09:00
|
|
|
|
offsetClock = new FramedOffsetClock(decoupledClock);
|
2017-04-21 16:19:40 +09:00
|
|
|
|
|
2017-05-15 10:56:27 +09:00
|
|
|
|
userAudioOffset = config.GetBindable<double>(OsuSetting.AudioOffset);
|
2017-04-21 16:19:40 +09:00
|
|
|
|
userAudioOffset.ValueChanged += v => offsetClock.Offset = v;
|
|
|
|
|
userAudioOffset.TriggerChange();
|
|
|
|
|
|
2016-10-28 14:14:45 +09:00
|
|
|
|
Schedule(() =>
|
|
|
|
|
{
|
2017-04-26 18:16:55 +09:00
|
|
|
|
adjustableSourceClock.Reset();
|
|
|
|
|
|
2017-04-21 17:33:20 +09:00
|
|
|
|
foreach (var mod in Beatmap.Mods.Value.OfType<IApplicableToClock>())
|
2017-04-26 18:16:55 +09:00
|
|
|
|
mod.ApplyToClock(adjustableSourceClock);
|
2017-04-26 18:07:22 +09:00
|
|
|
|
|
|
|
|
|
decoupledClock.ChangeSource(adjustableSourceClock);
|
2016-10-28 14:14:45 +09:00
|
|
|
|
});
|
|
|
|
|
|
2016-10-19 19:44:03 +09:00
|
|
|
|
Children = new Drawable[]
|
2016-10-06 23:33:09 +09:00
|
|
|
|
{
|
2017-05-17 21:57:01 +09:00
|
|
|
|
pauseContainer = new PauseContainer
|
2016-11-09 18:50:30 +09:00
|
|
|
|
{
|
2017-05-17 21:57:01 +09:00
|
|
|
|
AudioClock = decoupledClock,
|
|
|
|
|
FramedClock = offsetClock,
|
|
|
|
|
OnRetry = Restart,
|
|
|
|
|
OnQuit = Exit,
|
2017-05-20 18:56:50 +02:00
|
|
|
|
CheckCanPause = () => ValidForResume && !HasFailed && !HitRenderer.HasReplayLoaded,
|
2017-05-17 21:57:01 +09:00
|
|
|
|
Retries = RestartCount,
|
|
|
|
|
OnPause = () => {
|
|
|
|
|
hudOverlay.KeyCounter.IsCounting = pauseContainer.IsPaused;
|
|
|
|
|
},
|
|
|
|
|
OnResume = () => {
|
|
|
|
|
hudOverlay.KeyCounter.IsCounting = true;
|
|
|
|
|
},
|
2016-11-09 18:50:30 +09:00
|
|
|
|
Children = new Drawable[]
|
|
|
|
|
{
|
2017-05-19 22:12:09 +09:00
|
|
|
|
new SkipButton(firstObjectTime) { AudioClock = decoupledClock },
|
2017-04-26 18:07:22 +09:00
|
|
|
|
new Container
|
2017-02-28 20:14:48 +09:00
|
|
|
|
{
|
2017-04-26 18:07:22 +09:00
|
|
|
|
RelativeSizeAxes = Axes.Both,
|
|
|
|
|
Clock = offsetClock,
|
|
|
|
|
Children = new Drawable[]
|
|
|
|
|
{
|
|
|
|
|
HitRenderer,
|
|
|
|
|
}
|
2017-02-28 20:14:48 +09:00
|
|
|
|
},
|
2017-06-05 17:15:04 +09:00
|
|
|
|
hudOverlay = new HUDOverlay
|
2017-05-17 21:57:01 +09:00
|
|
|
|
{
|
|
|
|
|
Anchor = Anchor.Centre,
|
|
|
|
|
Origin = Anchor.Centre
|
|
|
|
|
},
|
2016-11-09 18:50:30 +09:00
|
|
|
|
}
|
|
|
|
|
},
|
2017-04-06 15:34:52 +09:00
|
|
|
|
failOverlay = new FailOverlay
|
|
|
|
|
{
|
|
|
|
|
OnRetry = Restart,
|
|
|
|
|
OnQuit = Exit,
|
2017-04-09 16:26:31 +03:00
|
|
|
|
},
|
2017-04-10 06:06:10 +03:00
|
|
|
|
new HotkeyRetryOverlay
|
2017-04-09 16:26:31 +03:00
|
|
|
|
{
|
2017-04-11 19:58:57 +09:00
|
|
|
|
Action = () => {
|
|
|
|
|
//we want to hide the hitrenderer immediately (looks better).
|
|
|
|
|
//we may be able to remove this once the mouse cursor trail is improved.
|
2017-04-12 00:09:45 +09:00
|
|
|
|
HitRenderer?.Hide();
|
2017-04-11 19:58:57 +09:00
|
|
|
|
Restart();
|
|
|
|
|
},
|
2017-04-06 15:34:52 +09:00
|
|
|
|
}
|
2016-10-19 19:44:03 +09:00
|
|
|
|
};
|
2016-10-28 14:14:45 +09:00
|
|
|
|
|
2017-05-17 21:57:01 +09:00
|
|
|
|
scoreProcessor = HitRenderer.CreateScoreProcessor();
|
|
|
|
|
|
|
|
|
|
hudOverlay.KeyCounter.Add(rulesetInstance.CreateGameplayKeys());
|
|
|
|
|
hudOverlay.BindProcessor(scoreProcessor);
|
|
|
|
|
hudOverlay.BindHitRenderer(HitRenderer);
|
2017-05-16 17:55:35 +09:00
|
|
|
|
|
2017-05-17 21:57:01 +09:00
|
|
|
|
hudOverlay.Progress.Objects = HitRenderer.Objects;
|
|
|
|
|
hudOverlay.Progress.AudioClock = decoupledClock;
|
|
|
|
|
hudOverlay.Progress.AllowSeeking = HitRenderer.HasReplayLoaded;
|
|
|
|
|
hudOverlay.Progress.OnSeek = pos => decoupledClock.Seek(pos);
|
|
|
|
|
|
|
|
|
|
hudOverlay.ModDisplay.Current.BindTo(Beatmap.Mods);
|
|
|
|
|
|
|
|
|
|
//bind HitRenderer to ScoreProcessor and ourselves (for a pass situation)
|
|
|
|
|
HitRenderer.OnAllJudged += onCompletion;
|
|
|
|
|
|
|
|
|
|
//bind ScoreProcessor to ourselves (for a fail situation)
|
|
|
|
|
scoreProcessor.Failed += onFail;
|
2017-05-16 17:55:35 +09:00
|
|
|
|
}
|
|
|
|
|
|
2017-01-28 16:55:42 -04:00
|
|
|
|
public void Restart()
|
|
|
|
|
{
|
2017-06-28 10:19:04 -07:00
|
|
|
|
sampleRestart?.Play();
|
2017-04-17 23:52:38 -07:00
|
|
|
|
ValidForResume = false;
|
2017-04-18 16:56:01 +09:00
|
|
|
|
RestartRequested?.Invoke();
|
2017-04-17 21:30:51 -07:00
|
|
|
|
Exit();
|
2017-01-27 15:28:39 -04:00
|
|
|
|
}
|
|
|
|
|
|
2017-04-07 16:55:41 +09:00
|
|
|
|
private ScheduledDelegate onCompletionEvent;
|
|
|
|
|
|
2017-03-16 13:39:57 +09:00
|
|
|
|
private void onCompletion()
|
2016-11-29 23:59:56 +09:00
|
|
|
|
{
|
2017-03-17 01:36:30 +09:00
|
|
|
|
// Only show the completion screen if the player hasn't failed
|
2017-04-07 16:55:41 +09:00
|
|
|
|
if (scoreProcessor.HasFailed || onCompletionEvent != null)
|
2017-03-17 00:30:23 +09:00
|
|
|
|
return;
|
|
|
|
|
|
2017-04-13 11:41:08 +09:00
|
|
|
|
ValidForResume = false;
|
|
|
|
|
|
2017-05-19 13:53:09 +09:00
|
|
|
|
using (BeginDelayedSequence(1000))
|
2016-11-29 23:59:56 +09:00
|
|
|
|
{
|
2017-05-19 13:53:09 +09:00
|
|
|
|
onCompletionEvent = Schedule(delegate
|
2017-04-20 11:16:08 +09:00
|
|
|
|
{
|
2017-05-19 13:53:09 +09:00
|
|
|
|
var score = new Score
|
|
|
|
|
{
|
|
|
|
|
Beatmap = Beatmap.BeatmapInfo,
|
|
|
|
|
Ruleset = ruleset
|
|
|
|
|
};
|
|
|
|
|
scoreProcessor.PopulateScore(score);
|
|
|
|
|
score.User = HitRenderer.Replay?.User ?? (Game as OsuGame)?.API?.LocalUser?.Value;
|
|
|
|
|
Push(new Results(score));
|
|
|
|
|
});
|
|
|
|
|
}
|
2016-11-29 23:59:56 +09:00
|
|
|
|
}
|
|
|
|
|
|
2017-01-20 15:51:43 +08:00
|
|
|
|
private void onFail()
|
|
|
|
|
{
|
2017-04-26 18:16:55 +09:00
|
|
|
|
decoupledClock.Stop();
|
2017-01-20 15:51:43 +08:00
|
|
|
|
|
2017-04-01 21:17:24 +03:00
|
|
|
|
HasFailed = true;
|
2017-03-28 04:53:57 +03:00
|
|
|
|
failOverlay.Retries = RestartCount;
|
|
|
|
|
failOverlay.Show();
|
2017-01-20 15:51:43 +08:00
|
|
|
|
}
|
|
|
|
|
|
2017-02-17 18:59:30 +09:00
|
|
|
|
protected override void OnEntering(Screen last)
|
2016-11-19 17:39:43 +01:00
|
|
|
|
{
|
|
|
|
|
base.OnEntering(last);
|
2017-02-15 12:38:10 +09:00
|
|
|
|
|
2017-02-22 21:43:29 +09:00
|
|
|
|
(Background as BackgroundScreenBeatmap)?.BlurTo(Vector2.Zero, 1500, EasingTypes.OutQuint);
|
2017-04-20 14:43:30 +02:00
|
|
|
|
Background?.FadeTo(1 - (float)dimLevel, 1500, EasingTypes.OutQuint);
|
2016-11-19 17:39:43 +01:00
|
|
|
|
|
2016-12-07 20:47:28 +09:00
|
|
|
|
Content.Alpha = 0;
|
2017-04-03 19:34:00 +09:00
|
|
|
|
|
2017-04-20 14:43:30 +02:00
|
|
|
|
dimLevel.ValueChanged += newDim => Background?.FadeTo(1 - (float)newDim, 800);
|
2017-02-22 14:14:37 +09:00
|
|
|
|
|
2017-02-22 21:43:29 +09:00
|
|
|
|
Content.ScaleTo(0.7f);
|
|
|
|
|
|
2017-05-19 13:53:09 +09:00
|
|
|
|
using (Content.BeginDelayedSequence(250))
|
|
|
|
|
Content.FadeIn(250);
|
2017-02-22 14:14:37 +09:00
|
|
|
|
|
2017-02-22 21:43:29 +09:00
|
|
|
|
Content.ScaleTo(1, 750, EasingTypes.OutQuint);
|
|
|
|
|
|
2017-05-19 13:53:09 +09:00
|
|
|
|
using (BeginDelayedSequence(750))
|
|
|
|
|
Schedule(() =>
|
|
|
|
|
{
|
|
|
|
|
if (!pauseContainer.IsPaused)
|
|
|
|
|
decoupledClock.Start();
|
|
|
|
|
});
|
2017-04-07 20:38:57 +09:00
|
|
|
|
|
2017-05-17 21:57:01 +09:00
|
|
|
|
pauseContainer.Alpha = 0;
|
|
|
|
|
pauseContainer.FadeIn(750, EasingTypes.OutQuint);
|
2017-02-22 14:14:37 +09:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void OnSuspending(Screen next)
|
|
|
|
|
{
|
2017-04-11 19:58:57 +09:00
|
|
|
|
fadeOut();
|
2017-02-22 14:14:37 +09:00
|
|
|
|
base.OnSuspending(next);
|
2016-10-28 14:14:45 +09:00
|
|
|
|
}
|
2016-11-16 15:48:35 +09:00
|
|
|
|
|
2017-02-17 18:59:30 +09:00
|
|
|
|
protected override bool OnExiting(Screen next)
|
2016-12-16 17:13:24 +01:00
|
|
|
|
{
|
2017-05-26 17:33:50 +09:00
|
|
|
|
if (HasFailed || !ValidForResume || pauseContainer?.AllowExit != false || HitRenderer?.HasReplayLoaded != false)
|
2017-04-07 20:46:35 +09:00
|
|
|
|
{
|
2017-05-17 21:57:01 +09:00
|
|
|
|
fadeOut();
|
|
|
|
|
return base.OnExiting(next);
|
2017-04-07 20:46:35 +09:00
|
|
|
|
}
|
2017-03-04 21:35:26 +09:00
|
|
|
|
|
2017-05-17 21:57:01 +09:00
|
|
|
|
pauseContainer.Pause();
|
|
|
|
|
return true;
|
2016-12-16 17:13:24 +01:00
|
|
|
|
}
|
|
|
|
|
|
2017-04-11 19:58:57 +09:00
|
|
|
|
private void fadeOut()
|
|
|
|
|
{
|
|
|
|
|
const float fade_out_duration = 250;
|
2017-02-15 12:38:10 +09:00
|
|
|
|
|
2017-04-11 19:58:57 +09:00
|
|
|
|
HitRenderer?.FadeOut(fade_out_duration);
|
|
|
|
|
Content.FadeOut(fade_out_duration);
|
2017-03-04 21:35:26 +09:00
|
|
|
|
|
2017-05-26 17:33:50 +09:00
|
|
|
|
hudOverlay?.ScaleTo(0.7f, fade_out_duration * 3, EasingTypes.In);
|
2017-01-31 20:44:59 -04:00
|
|
|
|
|
2017-04-11 19:58:57 +09:00
|
|
|
|
Background?.FadeTo(1f, fade_out_duration);
|
2016-12-16 17:13:24 +01:00
|
|
|
|
}
|
|
|
|
|
|
2017-05-17 21:57:01 +09:00
|
|
|
|
protected override bool OnWheel(InputState state) => mouseWheelDisabled.Value && !pauseContainer.IsPaused;
|
2016-09-29 20:13:58 +09:00
|
|
|
|
}
|
2017-04-12 00:09:45 +09:00
|
|
|
|
}
|