mirror of
https://github.com/ppy/osu.git
synced 2025-02-16 09:22:54 +08:00
Merge pull request #604 from peppy/taiko-fixes
Minor taiko improvements
This commit is contained in:
commit
53c491d4ef
@ -6,6 +6,7 @@ using System.Linq;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Modes.Objects.Drawables;
|
||||
using osu.Game.Modes.Taiko.Judgements;
|
||||
using osu.Game.Modes.Taiko.Objects.Drawables.Pieces;
|
||||
using OpenTK.Input;
|
||||
|
||||
namespace osu.Game.Modes.Taiko.Objects.Drawables
|
||||
@ -66,6 +67,10 @@ namespace osu.Game.Modes.Taiko.Objects.Drawables
|
||||
{
|
||||
Delay(HitObject.StartTime - Time.Current + Judgement.TimeOffset, true);
|
||||
|
||||
var circlePiece = MainPiece as CirclePiece;
|
||||
|
||||
circlePiece?.FlashBox.Flush();
|
||||
|
||||
switch (State)
|
||||
{
|
||||
case ArmedState.Idle:
|
||||
@ -77,6 +82,16 @@ namespace osu.Game.Modes.Taiko.Objects.Drawables
|
||||
case ArmedState.Hit:
|
||||
FadeOut(600);
|
||||
|
||||
var flash = circlePiece?.FlashBox;
|
||||
if (flash != null)
|
||||
{
|
||||
flash.FadeTo(0.9f);
|
||||
flash.FadeOut(300);
|
||||
}
|
||||
|
||||
|
||||
FadeOut(800);
|
||||
|
||||
const float gravity_time = 300;
|
||||
const float gravity_travel_height = 200;
|
||||
|
||||
|
@ -64,6 +64,8 @@ namespace osu.Game.Modes.Taiko.Objects.Drawables.Pieces
|
||||
|
||||
private readonly Container background;
|
||||
|
||||
public Box FlashBox;
|
||||
|
||||
public CirclePiece(bool isStrong = false)
|
||||
{
|
||||
AddInternal(new Drawable[]
|
||||
@ -104,11 +106,13 @@ namespace osu.Game.Modes.Taiko.Objects.Drawables.Pieces
|
||||
Masking = true,
|
||||
Children = new[]
|
||||
{
|
||||
new Box
|
||||
FlashBox = new Box
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Colour = Color4.White,
|
||||
BlendingMode = BlendingMode.Additive,
|
||||
Alpha = 0,
|
||||
AlwaysPresent = true
|
||||
}
|
||||
|
@ -20,6 +20,7 @@ using osu.Game.Screens.Backgrounds;
|
||||
using osu.Game.Screens.Ranking;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using osu.Framework.Threading;
|
||||
using osu.Game.Modes.Scoring;
|
||||
|
||||
namespace osu.Game.Screens.Play
|
||||
@ -237,14 +238,16 @@ namespace osu.Game.Screens.Play
|
||||
});
|
||||
}
|
||||
|
||||
private ScheduledDelegate onCompletionEvent;
|
||||
|
||||
private void onCompletion()
|
||||
{
|
||||
// Only show the completion screen if the player hasn't failed
|
||||
if (scoreProcessor.HasFailed)
|
||||
if (scoreProcessor.HasFailed || onCompletionEvent != null)
|
||||
return;
|
||||
|
||||
Delay(1000);
|
||||
Schedule(delegate
|
||||
onCompletionEvent = Schedule(delegate
|
||||
{
|
||||
ValidForResume = false;
|
||||
Push(new Results
|
||||
|
Loading…
Reference in New Issue
Block a user