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