mirror of
https://github.com/osukey/osukey.git
synced 2025-08-06 16:13:57 +09:00
Merge branch 'master' into taiko_replays
This commit is contained in:
Submodule osu-framework updated: fee17db537...4d131fd0d9
Submodule osu-resources updated: e674531595...12bbab717d
@ -6,10 +6,8 @@ using OpenTK.Graphics;
|
|||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
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.Testing;
|
using osu.Framework.Testing;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Modes.Taiko.Objects;
|
|
||||||
using osu.Game.Modes.Taiko.Objects.Drawable.Pieces;
|
using osu.Game.Modes.Taiko.Objects.Drawable.Pieces;
|
||||||
|
|
||||||
namespace osu.Desktop.VisualTests.Tests
|
namespace osu.Desktop.VisualTests.Tests
|
||||||
@ -30,39 +28,55 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
Reset();
|
Reset();
|
||||||
});
|
});
|
||||||
|
|
||||||
Add(new CentreHitCircle(new CirclePiece()
|
Add(new CirclePiece
|
||||||
{
|
{
|
||||||
KiaiMode = kiai
|
Position = new Vector2(100, 100),
|
||||||
})
|
Width = 0,
|
||||||
|
AccentColour = Color4.DarkRed,
|
||||||
|
KiaiMode = kiai,
|
||||||
|
Children = new[]
|
||||||
{
|
{
|
||||||
Position = new Vector2(100, 100)
|
new CentreHitSymbolPiece()
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Add(new CentreHitCircle(new StrongCirclePiece()
|
Add(new StrongCirclePiece
|
||||||
{
|
{
|
||||||
KiaiMode = kiai
|
Position = new Vector2(350, 100),
|
||||||
})
|
Width = 0,
|
||||||
|
AccentColour = Color4.DarkRed,
|
||||||
|
KiaiMode = kiai,
|
||||||
|
Children = new[]
|
||||||
{
|
{
|
||||||
Position = new Vector2(350, 100)
|
new CentreHitSymbolPiece()
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Add(new RimHitCircle(new CirclePiece()
|
Add(new CirclePiece
|
||||||
{
|
{
|
||||||
KiaiMode = kiai
|
Position = new Vector2(100, 300),
|
||||||
})
|
Width = 0,
|
||||||
|
AccentColour = Color4.DarkBlue,
|
||||||
|
KiaiMode = kiai,
|
||||||
|
Children = new[]
|
||||||
{
|
{
|
||||||
Position = new Vector2(100, 300)
|
new RimHitSymbolPiece()
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Add(new RimHitCircle(new StrongCirclePiece()
|
Add(new StrongCirclePiece
|
||||||
{
|
{
|
||||||
KiaiMode = kiai
|
Position = new Vector2(350, 300),
|
||||||
})
|
Width = 0,
|
||||||
|
AccentColour = Color4.DarkBlue,
|
||||||
|
KiaiMode = kiai,
|
||||||
|
Children = new[]
|
||||||
{
|
{
|
||||||
Position = new Vector2(350, 300)
|
new RimHitSymbolPiece()
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Add(new SwellCircle(new CirclePiece()
|
Add(new SwellCircle(new CirclePiece
|
||||||
{
|
{
|
||||||
KiaiMode = kiai
|
KiaiMode = kiai
|
||||||
})
|
})
|
||||||
@ -70,7 +84,7 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
Position = new Vector2(100, 500)
|
Position = new Vector2(100, 500)
|
||||||
});
|
});
|
||||||
|
|
||||||
Add(new SwellCircle(new StrongCirclePiece()
|
Add(new SwellCircle(new StrongCirclePiece
|
||||||
{
|
{
|
||||||
KiaiMode = kiai
|
KiaiMode = kiai
|
||||||
})
|
})
|
||||||
@ -78,7 +92,7 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
Position = new Vector2(350, 500)
|
Position = new Vector2(350, 500)
|
||||||
});
|
});
|
||||||
|
|
||||||
Add(new DrumRollCircle(new CirclePiece()
|
Add(new DrumRollCircle(new CirclePiece
|
||||||
{
|
{
|
||||||
KiaiMode = kiai
|
KiaiMode = kiai
|
||||||
})
|
})
|
||||||
@ -87,7 +101,7 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
Position = new Vector2(575, 100)
|
Position = new Vector2(575, 100)
|
||||||
});
|
});
|
||||||
|
|
||||||
Add(new DrumRollCircle(new StrongCirclePiece()
|
Add(new DrumRollCircle(new StrongCirclePiece
|
||||||
{
|
{
|
||||||
KiaiMode = kiai
|
KiaiMode = kiai
|
||||||
})
|
})
|
||||||
@ -106,7 +120,7 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
{
|
{
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
TextSize = SYMBOL_INNER_SIZE,
|
TextSize = CirclePiece.SYMBOL_INNER_SIZE,
|
||||||
Icon = FontAwesome.fa_asterisk,
|
Icon = FontAwesome.fa_asterisk,
|
||||||
Shadow = false
|
Shadow = false
|
||||||
});
|
});
|
||||||
@ -133,72 +147,8 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private class CentreHitCircle : BaseCircle
|
|
||||||
{
|
|
||||||
public CentreHitCircle(CirclePiece piece)
|
|
||||||
: base(piece)
|
|
||||||
{
|
|
||||||
Piece.Add(new CircularContainer
|
|
||||||
{
|
|
||||||
Anchor = Anchor.Centre,
|
|
||||||
Origin = Anchor.Centre,
|
|
||||||
Size = new Vector2(SYMBOL_INNER_SIZE),
|
|
||||||
Masking = true,
|
|
||||||
Children = new[]
|
|
||||||
{
|
|
||||||
new Box
|
|
||||||
{
|
|
||||||
RelativeSizeAxes = Axes.Both
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
|
||||||
private void load(OsuColour colours)
|
|
||||||
{
|
|
||||||
Piece.AccentColour = colours.PinkDarker;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private class RimHitCircle : BaseCircle
|
|
||||||
{
|
|
||||||
public RimHitCircle(CirclePiece piece)
|
|
||||||
: base(piece)
|
|
||||||
{
|
|
||||||
Piece.Add(new CircularContainer
|
|
||||||
{
|
|
||||||
Anchor = Anchor.Centre,
|
|
||||||
Origin = Anchor.Centre,
|
|
||||||
Size = new Vector2(SYMBOL_SIZE),
|
|
||||||
BorderThickness = SYMBOL_BORDER,
|
|
||||||
BorderColour = Color4.White,
|
|
||||||
Masking = true,
|
|
||||||
Children = new[]
|
|
||||||
{
|
|
||||||
new Box
|
|
||||||
{
|
|
||||||
RelativeSizeAxes = Axes.Both,
|
|
||||||
Alpha = 0,
|
|
||||||
AlwaysPresent = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
|
||||||
private void load(OsuColour colours)
|
|
||||||
{
|
|
||||||
Piece.AccentColour = colours.BlueDarker;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private abstract class BaseCircle : Container
|
private abstract class BaseCircle : Container
|
||||||
{
|
{
|
||||||
protected const float SYMBOL_SIZE = TaikoHitObject.CIRCLE_RADIUS * 2f * 0.45f;
|
|
||||||
protected const float SYMBOL_BORDER = 8;
|
|
||||||
protected const float SYMBOL_INNER_SIZE = SYMBOL_SIZE - 2 * SYMBOL_BORDER;
|
|
||||||
|
|
||||||
protected readonly CirclePiece Piece;
|
protected readonly CirclePiece Piece;
|
||||||
|
|
||||||
protected BaseCircle(CirclePiece piece)
|
protected BaseCircle(CirclePiece piece)
|
||||||
|
@ -1,11 +1,15 @@
|
|||||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Framework.Graphics.Containers;
|
||||||
|
using osu.Framework.Graphics.Primitives;
|
||||||
using osu.Framework.MathUtils;
|
using osu.Framework.MathUtils;
|
||||||
using osu.Framework.Testing;
|
using osu.Framework.Testing;
|
||||||
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;
|
using osu.Game.Modes.Taiko.Objects;
|
||||||
|
using osu.Game.Modes.Taiko.Objects.Drawable;
|
||||||
using osu.Game.Modes.Taiko.UI;
|
using osu.Game.Modes.Taiko.UI;
|
||||||
|
|
||||||
namespace osu.Desktop.VisualTests.Tests
|
namespace osu.Desktop.VisualTests.Tests
|
||||||
@ -22,10 +26,20 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
|
|
||||||
AddButton("Hit!", addHitJudgement);
|
AddButton("Hit!", addHitJudgement);
|
||||||
AddButton("Miss :(", addMissJudgement);
|
AddButton("Miss :(", addMissJudgement);
|
||||||
|
AddButton("Centre", () => addCentreHit(false));
|
||||||
|
AddButton("Strong Centre", () => addCentreHit(true));
|
||||||
|
AddButton("Rim", () => addRimHit(false));
|
||||||
|
AddButton("Strong Rim", () => addRimHit(true));
|
||||||
|
|
||||||
Add(playfield = new TaikoPlayfield
|
Add(new Container
|
||||||
{
|
{
|
||||||
Y = 200
|
RelativeSizeAxes = Axes.X,
|
||||||
|
Y = 200,
|
||||||
|
Padding = new MarginPadding { Left = 200 },
|
||||||
|
Children = new[]
|
||||||
|
{
|
||||||
|
playfield = new TaikoPlayfield()
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -60,6 +74,34 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void addCentreHit(bool strong)
|
||||||
|
{
|
||||||
|
Hit h = new Hit
|
||||||
|
{
|
||||||
|
StartTime = Time.Current + 1000,
|
||||||
|
PreEmpt = 1000
|
||||||
|
};
|
||||||
|
|
||||||
|
if (strong)
|
||||||
|
playfield.Add(new DrawableStrongCentreHit(h));
|
||||||
|
else
|
||||||
|
playfield.Add(new DrawableCentreHit(h));
|
||||||
|
}
|
||||||
|
|
||||||
|
private void addRimHit(bool strong)
|
||||||
|
{
|
||||||
|
Hit h = new Hit
|
||||||
|
{
|
||||||
|
StartTime = Time.Current + 1000,
|
||||||
|
PreEmpt = 1000
|
||||||
|
};
|
||||||
|
|
||||||
|
if (strong)
|
||||||
|
playfield.Add(new DrawableStrongRimHit(h));
|
||||||
|
else
|
||||||
|
playfield.Add(new DrawableRimHit(h));
|
||||||
|
}
|
||||||
|
|
||||||
private class DrawableTestHit : DrawableHitObject<TaikoHitObject, TaikoJudgement>
|
private class DrawableTestHit : DrawableHitObject<TaikoHitObject, TaikoJudgement>
|
||||||
{
|
{
|
||||||
public DrawableTestHit(TaikoHitObject hitObject)
|
public DrawableTestHit(TaikoHitObject hitObject)
|
||||||
|
@ -24,6 +24,11 @@ namespace osu.Desktop.VisualTests
|
|||||||
public override void SetHost(GameHost host)
|
public override void SetHost(GameHost host)
|
||||||
{
|
{
|
||||||
base.SetHost(host);
|
base.SetHost(host);
|
||||||
|
|
||||||
|
host.UpdateThread.InactiveHz = host.UpdateThread.ActiveHz;
|
||||||
|
host.DrawThread.InactiveHz = host.DrawThread.ActiveHz;
|
||||||
|
host.InputThread.InactiveHz = host.InputThread.ActiveHz;
|
||||||
|
|
||||||
host.Window.CursorState = CursorState.Hidden;
|
host.Window.CursorState = CursorState.Hidden;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
35
osu.Game.Modes.Taiko/Objects/Drawable/DrawableCentreHit.cs
Normal file
35
osu.Game.Modes.Taiko/Objects/Drawable/DrawableCentreHit.cs
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
// 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.Input;
|
||||||
|
using osu.Game.Modes.Taiko.Objects.Drawable.Pieces;
|
||||||
|
using osu.Game.Graphics;
|
||||||
|
using osu.Framework.Allocation;
|
||||||
|
|
||||||
|
namespace osu.Game.Modes.Taiko.Objects.Drawable
|
||||||
|
{
|
||||||
|
public class DrawableCentreHit : DrawableHit
|
||||||
|
{
|
||||||
|
protected override Key[] HitKeys { get; } = { Key.F, Key.J };
|
||||||
|
|
||||||
|
private readonly CirclePiece circlePiece;
|
||||||
|
|
||||||
|
public DrawableCentreHit(Hit hit)
|
||||||
|
: base(hit)
|
||||||
|
{
|
||||||
|
Add(circlePiece = new CirclePiece
|
||||||
|
{
|
||||||
|
Children = new[]
|
||||||
|
{
|
||||||
|
new CentreHitSymbolPiece()
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
[BackgroundDependencyLoader]
|
||||||
|
private void load(OsuColour colours)
|
||||||
|
{
|
||||||
|
circlePiece.AccentColour = colours.PinkDarker;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -2,10 +2,12 @@
|
|||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using OpenTK.Input;
|
using OpenTK.Input;
|
||||||
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Framework.Graphics.Containers;
|
||||||
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 System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Linq;
|
||||||
|
|
||||||
namespace osu.Game.Modes.Taiko.Objects.Drawable
|
namespace osu.Game.Modes.Taiko.Objects.Drawable
|
||||||
{
|
{
|
||||||
@ -14,7 +16,9 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// A list of keys which can result in hits for this HitObject.
|
/// A list of keys which can result in hits for this HitObject.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected abstract List<Key> HitKeys { get; }
|
protected abstract Key[] HitKeys { get; }
|
||||||
|
|
||||||
|
protected override Container<Framework.Graphics.Drawable> Content => bodyContainer;
|
||||||
|
|
||||||
private readonly Hit hit;
|
private readonly Hit hit;
|
||||||
|
|
||||||
@ -23,10 +27,18 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private bool validKeyPressed;
|
private bool validKeyPressed;
|
||||||
|
|
||||||
|
private readonly Container bodyContainer;
|
||||||
|
|
||||||
protected DrawableHit(Hit hit)
|
protected DrawableHit(Hit hit)
|
||||||
: base(hit)
|
: base(hit)
|
||||||
{
|
{
|
||||||
this.hit = hit;
|
this.hit = hit;
|
||||||
|
|
||||||
|
AddInternal(bodyContainer = new Container
|
||||||
|
{
|
||||||
|
Anchor = Anchor.Centre,
|
||||||
|
Origin = Anchor.Centre,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void CheckJudgement(bool userTriggered)
|
protected override void CheckJudgement(bool userTriggered)
|
||||||
@ -63,5 +75,30 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable
|
|||||||
|
|
||||||
return UpdateJudgement(true);
|
return UpdateJudgement(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void UpdateState(ArmedState state)
|
||||||
|
{
|
||||||
|
Delay(HitObject.StartTime - Time.Current + Judgement.TimeOffset, true);
|
||||||
|
|
||||||
|
switch (State)
|
||||||
|
{
|
||||||
|
case ArmedState.Idle:
|
||||||
|
Delay(hit.HitWindowMiss);
|
||||||
|
break;
|
||||||
|
case ArmedState.Miss:
|
||||||
|
FadeOut(100);
|
||||||
|
break;
|
||||||
|
case ArmedState.Hit:
|
||||||
|
bodyContainer.ScaleTo(0.8f, 400, EasingTypes.OutQuad);
|
||||||
|
bodyContainer.MoveToY(-200, 250, EasingTypes.Out);
|
||||||
|
bodyContainer.Delay(250);
|
||||||
|
bodyContainer.MoveToY(0, 500, EasingTypes.In);
|
||||||
|
|
||||||
|
FadeOut(600);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
Expire();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
35
osu.Game.Modes.Taiko/Objects/Drawable/DrawableRimHit.cs
Normal file
35
osu.Game.Modes.Taiko/Objects/Drawable/DrawableRimHit.cs
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Game.Graphics;
|
||||||
|
using OpenTK.Input;
|
||||||
|
using osu.Game.Modes.Taiko.Objects.Drawable.Pieces;
|
||||||
|
|
||||||
|
namespace osu.Game.Modes.Taiko.Objects.Drawable
|
||||||
|
{
|
||||||
|
public class DrawableRimHit : DrawableHit
|
||||||
|
{
|
||||||
|
protected override Key[] HitKeys { get; } = { Key.D, Key.K };
|
||||||
|
|
||||||
|
private readonly CirclePiece circlePiece;
|
||||||
|
|
||||||
|
public DrawableRimHit(Hit hit)
|
||||||
|
: base(hit)
|
||||||
|
{
|
||||||
|
Add(circlePiece = new CirclePiece
|
||||||
|
{
|
||||||
|
Children = new[]
|
||||||
|
{
|
||||||
|
new RimHitSymbolPiece()
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
[BackgroundDependencyLoader]
|
||||||
|
private void load(OsuColour colours)
|
||||||
|
{
|
||||||
|
circlePiece.AccentColour = colours.BlueDarker;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,35 @@
|
|||||||
|
// 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.Input;
|
||||||
|
using osu.Game.Modes.Taiko.Objects.Drawable.Pieces;
|
||||||
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Game.Graphics;
|
||||||
|
|
||||||
|
namespace osu.Game.Modes.Taiko.Objects.Drawable
|
||||||
|
{
|
||||||
|
public class DrawableStrongCentreHit : DrawableStrongHit
|
||||||
|
{
|
||||||
|
protected override Key[] HitKeys { get; } = { Key.F, Key.J };
|
||||||
|
|
||||||
|
private readonly CirclePiece circlePiece;
|
||||||
|
|
||||||
|
public DrawableStrongCentreHit(Hit hit)
|
||||||
|
: base(hit)
|
||||||
|
{
|
||||||
|
Add(circlePiece = new StrongCirclePiece
|
||||||
|
{
|
||||||
|
Children = new []
|
||||||
|
{
|
||||||
|
new CentreHitSymbolPiece()
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
[BackgroundDependencyLoader]
|
||||||
|
private void load(OsuColour colours)
|
||||||
|
{
|
||||||
|
circlePiece.AccentColour = colours.PinkDarker;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,35 @@
|
|||||||
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Game.Graphics;
|
||||||
|
using OpenTK.Input;
|
||||||
|
using osu.Game.Modes.Taiko.Objects.Drawable.Pieces;
|
||||||
|
|
||||||
|
namespace osu.Game.Modes.Taiko.Objects.Drawable
|
||||||
|
{
|
||||||
|
public class DrawableStrongRimHit : DrawableStrongHit
|
||||||
|
{
|
||||||
|
protected override Key[] HitKeys { get; } = { Key.D, Key.K };
|
||||||
|
|
||||||
|
private readonly CirclePiece circlePiece;
|
||||||
|
|
||||||
|
public DrawableStrongRimHit(Hit hit)
|
||||||
|
: base(hit)
|
||||||
|
{
|
||||||
|
Add(circlePiece = new StrongCirclePiece
|
||||||
|
{
|
||||||
|
Children = new[]
|
||||||
|
{
|
||||||
|
new RimHitSymbolPiece()
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
[BackgroundDependencyLoader]
|
||||||
|
private void load(OsuColour colours)
|
||||||
|
{
|
||||||
|
circlePiece.AccentColour = colours.BlueDarker;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -30,7 +30,6 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable
|
|||||||
protected override void LoadComplete()
|
protected override void LoadComplete()
|
||||||
{
|
{
|
||||||
LifetimeStart = HitObject.StartTime - HitObject.PreEmpt * 2;
|
LifetimeStart = HitObject.StartTime - HitObject.PreEmpt * 2;
|
||||||
LifetimeEnd = HitObject.StartTime + HitObject.PreEmpt;
|
|
||||||
|
|
||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,31 @@
|
|||||||
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using osu.Framework.Graphics.Containers;
|
||||||
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Framework.Graphics.Sprites;
|
||||||
|
using OpenTK;
|
||||||
|
|
||||||
|
namespace osu.Game.Modes.Taiko.Objects.Drawable.Pieces
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The symbol used for centre hit pieces.
|
||||||
|
/// </summary>
|
||||||
|
public class CentreHitSymbolPiece : CircularContainer
|
||||||
|
{
|
||||||
|
public CentreHitSymbolPiece()
|
||||||
|
{
|
||||||
|
Anchor = Anchor.Centre;
|
||||||
|
Origin = Anchor.Centre;
|
||||||
|
Size = new Vector2(CirclePiece.SYMBOL_INNER_SIZE);
|
||||||
|
Masking = true;
|
||||||
|
Children = new[]
|
||||||
|
{
|
||||||
|
new Box
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.Both
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,36 @@
|
|||||||
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using osu.Framework.Graphics.Containers;
|
||||||
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Framework.Graphics.Sprites;
|
||||||
|
using OpenTK;
|
||||||
|
using OpenTK.Graphics;
|
||||||
|
|
||||||
|
namespace osu.Game.Modes.Taiko.Objects.Drawable.Pieces
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The symbol used for rim hit pieces.
|
||||||
|
/// </summary>
|
||||||
|
public class RimHitSymbolPiece : CircularContainer
|
||||||
|
{
|
||||||
|
public RimHitSymbolPiece()
|
||||||
|
{
|
||||||
|
Anchor = Anchor.Centre;
|
||||||
|
Origin = Anchor.Centre;
|
||||||
|
Size = new Vector2(CirclePiece.SYMBOL_SIZE);
|
||||||
|
BorderThickness = CirclePiece.SYMBOL_BORDER;
|
||||||
|
BorderColour = Color4.White;
|
||||||
|
Masking = true;
|
||||||
|
Children = new[]
|
||||||
|
{
|
||||||
|
new Box
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Alpha = 0,
|
||||||
|
AlwaysPresent = true
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -12,7 +12,7 @@ namespace osu.Game.Modes.Taiko.Objects
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// HitCircle radius.
|
/// HitCircle radius.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const float CIRCLE_RADIUS = 64;
|
public const float CIRCLE_RADIUS = 42f;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The time to scroll in the HitObject.
|
/// The time to scroll in the HitObject.
|
||||||
|
@ -18,7 +18,7 @@ namespace osu.Game.Modes.Taiko.UI
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Diameter of normal hit object circles.
|
/// Diameter of normal hit object circles.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private const float normal_diameter = TaikoHitObject.CIRCLE_RADIUS * 2 * TaikoPlayfield.PLAYFIELD_SCALE;
|
private const float normal_diameter = TaikoHitObject.CIRCLE_RADIUS * 2;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Diameter of finisher hit object circles.
|
/// Diameter of finisher hit object circles.
|
||||||
@ -47,7 +47,7 @@ namespace osu.Game.Modes.Taiko.UI
|
|||||||
Anchor = Anchor.TopCentre,
|
Anchor = Anchor.TopCentre,
|
||||||
Origin = Anchor.TopCentre,
|
Origin = Anchor.TopCentre,
|
||||||
Y = border_offset,
|
Y = border_offset,
|
||||||
Size = new Vector2(border_thickness, (TaikoPlayfield.PlayfieldHeight - finisher_diameter) / 2f - border_offset),
|
Size = new Vector2(border_thickness, (TaikoPlayfield.PLAYFIELD_HEIGHT - finisher_diameter) / 2f - border_offset),
|
||||||
Alpha = 0.1f
|
Alpha = 0.1f
|
||||||
},
|
},
|
||||||
new CircularContainer
|
new CircularContainer
|
||||||
@ -96,7 +96,7 @@ namespace osu.Game.Modes.Taiko.UI
|
|||||||
Anchor = Anchor.BottomCentre,
|
Anchor = Anchor.BottomCentre,
|
||||||
Origin = Anchor.BottomCentre,
|
Origin = Anchor.BottomCentre,
|
||||||
Y = -border_offset,
|
Y = -border_offset,
|
||||||
Size = new Vector2(border_thickness, (TaikoPlayfield.PlayfieldHeight - finisher_diameter) / 2f - border_offset),
|
Size = new Vector2(border_thickness, (TaikoPlayfield.PLAYFIELD_HEIGHT - finisher_diameter) / 2f - border_offset),
|
||||||
Alpha = 0.1f
|
Alpha = 0.1f
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -21,7 +21,7 @@ namespace osu.Game.Modes.Taiko.UI
|
|||||||
{
|
{
|
||||||
public InputDrum()
|
public InputDrum()
|
||||||
{
|
{
|
||||||
Size = new Vector2(TaikoPlayfield.PlayfieldHeight);
|
Size = new Vector2(TaikoPlayfield.PLAYFIELD_HEIGHT);
|
||||||
|
|
||||||
const float middle_split = 10;
|
const float middle_split = 10;
|
||||||
|
|
||||||
|
@ -20,25 +20,15 @@ namespace osu.Game.Modes.Taiko.UI
|
|||||||
public class TaikoPlayfield : Playfield<TaikoHitObject, TaikoJudgement>
|
public class TaikoPlayfield : Playfield<TaikoHitObject, TaikoJudgement>
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The default play field height.
|
/// The play field height. This is relative to the size of hit objects
|
||||||
|
/// such that the playfield is just a bit larger than finishers.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const float PLAYFIELD_BASE_HEIGHT = 242;
|
public const float PLAYFIELD_HEIGHT = TaikoHitObject.CIRCLE_RADIUS * 2 * 2;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The play field height scale.
|
|
||||||
/// This also uniformly scales the notes to match the new playfield height.
|
|
||||||
/// </summary>
|
|
||||||
public const float PLAYFIELD_SCALE = 0.65f;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The play field height after scaling.
|
|
||||||
/// </summary>
|
|
||||||
public static float PlayfieldHeight => PLAYFIELD_BASE_HEIGHT * PLAYFIELD_SCALE;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The offset from <see cref="left_area_size"/> which the center of the hit target lies at.
|
/// The offset from <see cref="left_area_size"/> which the center of the hit target lies at.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private const float hit_target_offset = 80;
|
private const float hit_target_offset = TaikoHitObject.CIRCLE_RADIUS * 1.5f + 40;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The size of the left area of the playfield. This area contains the input drum.
|
/// The size of the left area of the playfield. This area contains the input drum.
|
||||||
@ -61,7 +51,7 @@ namespace osu.Game.Modes.Taiko.UI
|
|||||||
public TaikoPlayfield()
|
public TaikoPlayfield()
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X;
|
RelativeSizeAxes = Axes.X;
|
||||||
Height = PlayfieldHeight;
|
Height = PLAYFIELD_HEIGHT;
|
||||||
|
|
||||||
AddInternal(new Drawable[]
|
AddInternal(new Drawable[]
|
||||||
{
|
{
|
||||||
@ -102,7 +92,6 @@ namespace osu.Game.Modes.Taiko.UI
|
|||||||
Anchor = Anchor.CentreLeft,
|
Anchor = Anchor.CentreLeft,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
Size = new Vector2(TaikoHitObject.CIRCLE_RADIUS * 2),
|
Size = new Vector2(TaikoHitObject.CIRCLE_RADIUS * 2),
|
||||||
Scale = new Vector2(PLAYFIELD_SCALE),
|
|
||||||
BlendingMode = BlendingMode.Additive
|
BlendingMode = BlendingMode.Additive
|
||||||
},
|
},
|
||||||
//barLineContainer = new Container<DrawableBarLine>
|
//barLineContainer = new Container<DrawableBarLine>
|
||||||
@ -129,7 +118,7 @@ namespace osu.Game.Modes.Taiko.UI
|
|||||||
},
|
},
|
||||||
leftBackgroundContainer = new Container
|
leftBackgroundContainer = new Container
|
||||||
{
|
{
|
||||||
Size = new Vector2(left_area_size, PlayfieldHeight),
|
Size = new Vector2(left_area_size, PLAYFIELD_HEIGHT),
|
||||||
BorderThickness = 1,
|
BorderThickness = 1,
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
@ -174,7 +163,6 @@ namespace osu.Game.Modes.Taiko.UI
|
|||||||
public override void Add(DrawableHitObject<TaikoHitObject, TaikoJudgement> h)
|
public override void Add(DrawableHitObject<TaikoHitObject, TaikoJudgement> h)
|
||||||
{
|
{
|
||||||
h.Depth = (float)h.HitObject.StartTime;
|
h.Depth = (float)h.HitObject.StartTime;
|
||||||
h.Scale = new Vector2(PLAYFIELD_SCALE);
|
|
||||||
|
|
||||||
base.Add(h);
|
base.Add(h);
|
||||||
}
|
}
|
||||||
|
@ -53,12 +53,18 @@
|
|||||||
<Compile Include="Judgements\TaikoJudgement.cs" />
|
<Compile Include="Judgements\TaikoJudgement.cs" />
|
||||||
<Compile Include="Judgements\TaikoHitResult.cs" />
|
<Compile Include="Judgements\TaikoHitResult.cs" />
|
||||||
<Compile Include="LegacyTaikoReplay.cs" />
|
<Compile Include="LegacyTaikoReplay.cs" />
|
||||||
|
<Compile Include="Objects\Drawable\DrawableRimHit.cs" />
|
||||||
|
<Compile Include="Objects\Drawable\DrawableStrongRimHit.cs" />
|
||||||
|
<Compile Include="Objects\Drawable\DrawableCentreHit.cs" />
|
||||||
<Compile Include="Objects\Drawable\DrawableHit.cs" />
|
<Compile Include="Objects\Drawable\DrawableHit.cs" />
|
||||||
|
<Compile Include="Objects\Drawable\DrawableStrongCentreHit.cs" />
|
||||||
<Compile Include="Objects\Drawable\DrawableStrongHit.cs" />
|
<Compile Include="Objects\Drawable\DrawableStrongHit.cs" />
|
||||||
|
<Compile Include="Objects\Drawable\Pieces\CentreHitSymbolPiece.cs" />
|
||||||
<Compile Include="Objects\Drawable\DrawableDrumRoll.cs" />
|
<Compile Include="Objects\Drawable\DrawableDrumRoll.cs" />
|
||||||
<Compile Include="Objects\Drawable\DrawableDrumRollTick.cs" />
|
<Compile Include="Objects\Drawable\DrawableDrumRollTick.cs" />
|
||||||
<Compile Include="Objects\Drawable\DrawableSwell.cs" />
|
<Compile Include="Objects\Drawable\DrawableSwell.cs" />
|
||||||
<Compile Include="Objects\Drawable\DrawableTaikoHitObject.cs" />
|
<Compile Include="Objects\Drawable\DrawableTaikoHitObject.cs" />
|
||||||
|
<Compile Include="Objects\Drawable\Pieces\RimHitSymbolPiece.cs" />
|
||||||
<Compile Include="Objects\Drawable\Pieces\StrongCirclePiece.cs" />
|
<Compile Include="Objects\Drawable\Pieces\StrongCirclePiece.cs" />
|
||||||
<Compile Include="Objects\Drawable\Pieces\CirclePiece.cs" />
|
<Compile Include="Objects\Drawable\Pieces\CirclePiece.cs" />
|
||||||
<Compile Include="Objects\DrumRoll.cs" />
|
<Compile Include="Objects\DrumRoll.cs" />
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
@ -36,7 +36,8 @@ namespace osu.Game.Beatmaps.Drawables
|
|||||||
new DelayedLoadContainer
|
new DelayedLoadContainer
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
TimeBeforeLoad = 100,
|
TimeBeforeLoad = 300,
|
||||||
|
FinishedLoading = d => d.FadeInFromZero(400, EasingTypes.Out),
|
||||||
Children = new[]
|
Children = new[]
|
||||||
{
|
{
|
||||||
new PanelBackground(beatmap)
|
new PanelBackground(beatmap)
|
||||||
|
@ -152,6 +152,8 @@ namespace osu.Game.Modes.Scoring
|
|||||||
|
|
||||||
protected override void Reset()
|
protected override void Reset()
|
||||||
{
|
{
|
||||||
|
base.Reset();
|
||||||
|
|
||||||
Judgements.Clear();
|
Judgements.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -199,7 +199,7 @@ namespace osu.Game
|
|||||||
{
|
{
|
||||||
Depth = -3,
|
Depth = -3,
|
||||||
OnHome = delegate { intro?.ChildScreen?.MakeCurrent(); },
|
OnHome = delegate { intro?.ChildScreen?.MakeCurrent(); },
|
||||||
OnPlayModeChange = delegate (PlayMode m) { PlayMode.Value = m; },
|
OnPlayModeChange = m => PlayMode.Value = m,
|
||||||
}).LoadAsync(this, t =>
|
}).LoadAsync(this, t =>
|
||||||
{
|
{
|
||||||
PlayMode.ValueChanged += delegate { Toolbar.SetGameMode(PlayMode.Value); };
|
PlayMode.ValueChanged += delegate { Toolbar.SetGameMode(PlayMode.Value); };
|
||||||
|
@ -65,14 +65,13 @@ namespace osu.Game.Overlays.Toolbar
|
|||||||
|
|
||||||
foreach (PlayMode m in Ruleset.PlayModes)
|
foreach (PlayMode m in Ruleset.PlayModes)
|
||||||
{
|
{
|
||||||
var localMode = m;
|
|
||||||
modeButtons.Add(new ToolbarModeButton
|
modeButtons.Add(new ToolbarModeButton
|
||||||
{
|
{
|
||||||
Mode = m,
|
Mode = m,
|
||||||
Action = delegate
|
Action = delegate
|
||||||
{
|
{
|
||||||
SetGameMode(localMode);
|
SetGameMode(m);
|
||||||
OnPlayModeChange?.Invoke(localMode);
|
OnPlayModeChange?.Invoke(m);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -181,7 +181,8 @@ namespace osu.Game.Screens.Select
|
|||||||
{
|
{
|
||||||
if (!IsLoaded) return;
|
if (!IsLoaded) return;
|
||||||
|
|
||||||
criteria = newCriteria ?? criteria ?? new FilterCriteria();
|
if (newCriteria != null)
|
||||||
|
criteria = newCriteria;
|
||||||
|
|
||||||
Action perform = delegate
|
Action perform = delegate
|
||||||
{
|
{
|
||||||
@ -202,6 +203,8 @@ namespace osu.Game.Screens.Select
|
|||||||
|
|
||||||
if (selectedGroup == null || selectedGroup.State == BeatmapGroupState.Hidden)
|
if (selectedGroup == null || selectedGroup.State == BeatmapGroupState.Hidden)
|
||||||
SelectNext();
|
SelectNext();
|
||||||
|
else
|
||||||
|
selectGroup(selectedGroup);
|
||||||
};
|
};
|
||||||
|
|
||||||
filterTask?.Cancel();
|
filterTask?.Cancel();
|
||||||
|
@ -175,6 +175,7 @@ namespace osu.Game.Screens.Select
|
|||||||
|
|
||||||
if (osu != null)
|
if (osu != null)
|
||||||
playMode.BindTo(osu.PlayMode);
|
playMode.BindTo(osu.PlayMode);
|
||||||
|
playMode.ValueChanged += (s, e) => FilterChanged?.Invoke(CreateCriteria());
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args) => true;
|
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args) => true;
|
||||||
|
@ -29,7 +29,12 @@ namespace osu.Game.Screens.Select.Leaderboards
|
|||||||
|
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
rankSprite = new Sprite { FillMode = FillMode.Fill },
|
rankSprite = new Sprite
|
||||||
|
{
|
||||||
|
Anchor = Anchor.Centre,
|
||||||
|
Origin = Anchor.Centre,
|
||||||
|
FillMode = FillMode.Fit
|
||||||
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -276,7 +276,7 @@ namespace osu.Game.Screens.Select
|
|||||||
initialAddSetsTask.Cancel();
|
initialAddSetsTask.Cancel();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void playMode_ValueChanged(object sender, EventArgs e) => carousel.Filter();
|
private void playMode_ValueChanged(object sender, EventArgs e) => Beatmap.PreferredPlayMode = playMode;
|
||||||
|
|
||||||
private void changeBackground(WorkingBeatmap beatmap)
|
private void changeBackground(WorkingBeatmap beatmap)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user