mirror of
https://github.com/ppy/osu.git
synced 2025-01-06 09:42:55 +08:00
Hook everything up
This commit is contained in:
parent
ec08b2940d
commit
a18b2bd5f0
@ -16,6 +16,8 @@ using osu.Game.Beatmaps.ControlPoints;
|
|||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Desktop.Tests.Beatmaps;
|
using osu.Desktop.Tests.Beatmaps;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Game.Rulesets;
|
||||||
using osu.Game.Rulesets.Objects;
|
using osu.Game.Rulesets.Objects;
|
||||||
|
|
||||||
namespace osu.Desktop.Tests.Visual
|
namespace osu.Desktop.Tests.Visual
|
||||||
@ -30,10 +32,11 @@ namespace osu.Desktop.Tests.Visual
|
|||||||
protected override double TimePerAction => default_duration * 2;
|
protected override double TimePerAction => default_duration * 2;
|
||||||
|
|
||||||
private readonly Random rng = new Random(1337);
|
private readonly Random rng = new Random(1337);
|
||||||
private readonly TaikoRulesetContainer rulesetContainer;
|
private TaikoRulesetContainer rulesetContainer;
|
||||||
private readonly Container playfieldContainer;
|
private Container playfieldContainer;
|
||||||
|
|
||||||
public TestCaseTaikoPlayfield()
|
[BackgroundDependencyLoader]
|
||||||
|
private void load(RulesetStore rulesets)
|
||||||
{
|
{
|
||||||
AddStep("Hit!", () => addHitJudgement(false));
|
AddStep("Hit!", () => addHitJudgement(false));
|
||||||
AddStep("Kiai hit", () => addHitJudgement(true));
|
AddStep("Kiai hit", () => addHitJudgement(true));
|
||||||
@ -82,7 +85,7 @@ namespace osu.Desktop.Tests.Visual
|
|||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
Height = 768,
|
Height = 768,
|
||||||
Clock = new FramedClock(rateAdjustClock),
|
Clock = new FramedClock(rateAdjustClock),
|
||||||
Children = new[] { rulesetContainer = new TaikoRulesetContainer(null, beatmap, true) }
|
Children = new[] { rulesetContainer = new TaikoRulesetContainer(rulesets.GetRuleset(1).CreateInstance(), beatmap, true) }
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
// 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 System.ComponentModel;
|
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Input.Bindings;
|
using osu.Framework.Input.Bindings;
|
||||||
using osu.Game.Rulesets.Objects.Drawables;
|
using osu.Game.Rulesets.Objects.Drawables;
|
||||||
@ -45,16 +44,4 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
|||||||
|
|
||||||
public virtual bool OnReleased(TaikoAction action) => false;
|
public virtual bool OnReleased(TaikoAction action) => false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum TaikoAction
|
|
||||||
{
|
|
||||||
[Description("Left (Rim)")]
|
|
||||||
LeftRim,
|
|
||||||
[Description("Left (Centre)")]
|
|
||||||
LeftCentre,
|
|
||||||
[Description("Right (Centre)")]
|
|
||||||
RightCentre,
|
|
||||||
[Description("Right (Rim)")]
|
|
||||||
RightRim
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
29
osu.Game.Rulesets.Taiko/TaikoInputManager.cs
Normal file
29
osu.Game.Rulesets.Taiko/TaikoInputManager.cs
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using System.ComponentModel;
|
||||||
|
using osu.Framework.Input.Bindings;
|
||||||
|
using osu.Game.Input.Bindings;
|
||||||
|
|
||||||
|
namespace osu.Game.Rulesets.Taiko
|
||||||
|
{
|
||||||
|
public class TaikoInputManager : DatabasedKeyBindingInputManager<TaikoAction>
|
||||||
|
{
|
||||||
|
public TaikoInputManager(RulesetInfo ruleset)
|
||||||
|
: base(ruleset, 0, SimultaneousBindingMode.Unique)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum TaikoAction
|
||||||
|
{
|
||||||
|
[Description("Left (Rim)")]
|
||||||
|
LeftRim,
|
||||||
|
[Description("Left (Centre)")]
|
||||||
|
LeftCentre,
|
||||||
|
[Description("Right (Centre)")]
|
||||||
|
RightCentre,
|
||||||
|
[Description("Right (Rim)")]
|
||||||
|
RightRim
|
||||||
|
}
|
||||||
|
}
|
@ -14,7 +14,6 @@ using osu.Framework.Graphics;
|
|||||||
using osu.Game.Rulesets.Scoring;
|
using osu.Game.Rulesets.Scoring;
|
||||||
using osu.Game.Rulesets.Taiko.Scoring;
|
using osu.Game.Rulesets.Taiko.Scoring;
|
||||||
using osu.Framework.Input.Bindings;
|
using osu.Framework.Input.Bindings;
|
||||||
using osu.Game.Rulesets.Taiko.Objects.Drawables;
|
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Taiko
|
namespace osu.Game.Rulesets.Taiko
|
||||||
{
|
{
|
||||||
|
@ -10,7 +10,6 @@ using osu.Framework.Graphics.Sprites;
|
|||||||
using osu.Framework.Graphics.Textures;
|
using osu.Framework.Graphics.Textures;
|
||||||
using osu.Framework.Input.Bindings;
|
using osu.Framework.Input.Bindings;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Rulesets.Taiko.Objects.Drawables;
|
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Taiko.UI
|
namespace osu.Game.Rulesets.Taiko.UI
|
||||||
{
|
{
|
||||||
|
@ -18,6 +18,7 @@ using osu.Game.Rulesets.Taiko.Replays;
|
|||||||
using OpenTK;
|
using OpenTK;
|
||||||
using osu.Game.Rulesets.Beatmaps;
|
using osu.Game.Rulesets.Beatmaps;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using osu.Framework.Input;
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Taiko.UI
|
namespace osu.Game.Rulesets.Taiko.UI
|
||||||
{
|
{
|
||||||
@ -92,6 +93,8 @@ namespace osu.Game.Rulesets.Taiko.UI
|
|||||||
|
|
||||||
protected override BeatmapConverter<TaikoHitObject> CreateBeatmapConverter() => new TaikoBeatmapConverter();
|
protected override BeatmapConverter<TaikoHitObject> CreateBeatmapConverter() => new TaikoBeatmapConverter();
|
||||||
|
|
||||||
|
public override PassThroughInputManager CreateKeyBindingInputManager() => new TaikoInputManager(Ruleset?.RulesetInfo);
|
||||||
|
|
||||||
protected override Playfield<TaikoHitObject, TaikoJudgement> CreatePlayfield() => new TaikoPlayfield
|
protected override Playfield<TaikoHitObject, TaikoJudgement> CreatePlayfield() => new TaikoPlayfield
|
||||||
{
|
{
|
||||||
Anchor = Anchor.CentreLeft,
|
Anchor = Anchor.CentreLeft,
|
||||||
|
@ -86,6 +86,7 @@
|
|||||||
<Compile Include="TaikoDifficultyCalculator.cs" />
|
<Compile Include="TaikoDifficultyCalculator.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<Compile Include="Scoring\TaikoScoreProcessor.cs" />
|
<Compile Include="Scoring\TaikoScoreProcessor.cs" />
|
||||||
|
<Compile Include="TaikoInputManager.cs" />
|
||||||
<Compile Include="UI\HitTarget.cs" />
|
<Compile Include="UI\HitTarget.cs" />
|
||||||
<Compile Include="UI\InputDrum.cs" />
|
<Compile Include="UI\InputDrum.cs" />
|
||||||
<Compile Include="UI\KiaiHitExplosion.cs" />
|
<Compile Include="UI\KiaiHitExplosion.cs" />
|
||||||
|
Loading…
Reference in New Issue
Block a user