mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 09:27:29 +08:00
Use test scene beatmap bindable
This commit is contained in:
parent
ece6e2db5c
commit
0972442b3a
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="RiderProjectSettingsUpdater">
|
<component name="RiderProjectSettingsUpdater">
|
||||||
<option name="vcsConfiguration" value="2" />
|
<option name="vcsConfiguration" value="1" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
@ -37,13 +37,18 @@ namespace osu.Game.Rulesets.Taiko.Tests.Skinning
|
|||||||
TimeRange = { Value = 5000 },
|
TimeRange = { Value = 5000 },
|
||||||
};
|
};
|
||||||
|
|
||||||
[Cached(typeof(IBindable<WorkingBeatmap>))]
|
private Bindable<WorkingBeatmap> workingBeatmap;
|
||||||
private Bindable<WorkingBeatmap> beatmap = new Bindable<WorkingBeatmap>();
|
|
||||||
|
|
||||||
private readonly List<DrawableTaikoMascot> mascots = new List<DrawableTaikoMascot>();
|
private readonly List<DrawableTaikoMascot> mascots = new List<DrawableTaikoMascot>();
|
||||||
private readonly List<TaikoPlayfield> playfields = new List<TaikoPlayfield>();
|
private readonly List<TaikoPlayfield> playfields = new List<TaikoPlayfield>();
|
||||||
private readonly List<DrawableTaikoRuleset> rulesets = new List<DrawableTaikoRuleset>();
|
private readonly List<DrawableTaikoRuleset> rulesets = new List<DrawableTaikoRuleset>();
|
||||||
|
|
||||||
|
[BackgroundDependencyLoader]
|
||||||
|
private void load(Bindable<WorkingBeatmap> beatmap)
|
||||||
|
{
|
||||||
|
workingBeatmap = beatmap;
|
||||||
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void TestStateTextures()
|
public void TestStateTextures()
|
||||||
{
|
{
|
||||||
@ -79,7 +84,7 @@ namespace osu.Game.Rulesets.Taiko.Tests.Skinning
|
|||||||
SetContents(() =>
|
SetContents(() =>
|
||||||
{
|
{
|
||||||
var ruleset = new TaikoRuleset();
|
var ruleset = new TaikoRuleset();
|
||||||
var drawableRuleset = new DrawableTaikoRuleset(ruleset, beatmap.Value.GetPlayableBeatmap(ruleset.RulesetInfo));
|
var drawableRuleset = new DrawableTaikoRuleset(ruleset, workingBeatmap.Value.GetPlayableBeatmap(ruleset.RulesetInfo));
|
||||||
rulesets.Add(drawableRuleset);
|
rulesets.Add(drawableRuleset);
|
||||||
return drawableRuleset;
|
return drawableRuleset;
|
||||||
});
|
});
|
||||||
@ -110,17 +115,17 @@ namespace osu.Game.Rulesets.Taiko.Tests.Skinning
|
|||||||
{
|
{
|
||||||
AddStep("Set beatmap", () => setBeatmap(true));
|
AddStep("Set beatmap", () => setBeatmap(true));
|
||||||
|
|
||||||
AddUntilStep("Wait for beatmap to be loaded", () => beatmap.Value.Track.IsLoaded);
|
AddUntilStep("Wait for beatmap to be loaded", () => workingBeatmap.Value.Track.IsLoaded);
|
||||||
|
|
||||||
AddStep("Create kiai ruleset", () =>
|
AddStep("Create kiai ruleset", () =>
|
||||||
{
|
{
|
||||||
beatmap.Value.Track.Start();
|
workingBeatmap.Value.Track.Start();
|
||||||
|
|
||||||
rulesets.Clear();
|
rulesets.Clear();
|
||||||
SetContents(() =>
|
SetContents(() =>
|
||||||
{
|
{
|
||||||
var ruleset = new TaikoRuleset();
|
var ruleset = new TaikoRuleset();
|
||||||
var drawableRuleset = new DrawableTaikoRuleset(ruleset, beatmap.Value.GetPlayableBeatmap(ruleset.RulesetInfo));
|
var drawableRuleset = new DrawableTaikoRuleset(ruleset, workingBeatmap.Value.GetPlayableBeatmap(ruleset.RulesetInfo));
|
||||||
rulesets.Add(drawableRuleset);
|
rulesets.Add(drawableRuleset);
|
||||||
return drawableRuleset;
|
return drawableRuleset;
|
||||||
});
|
});
|
||||||
@ -148,7 +153,7 @@ namespace osu.Game.Rulesets.Taiko.Tests.Skinning
|
|||||||
if (kiai)
|
if (kiai)
|
||||||
controlPointInfo.Add(0, new EffectControlPoint { KiaiMode = true });
|
controlPointInfo.Add(0, new EffectControlPoint { KiaiMode = true });
|
||||||
|
|
||||||
beatmap.Value = CreateWorkingBeatmap(new Beatmap
|
workingBeatmap.Value = CreateWorkingBeatmap(new Beatmap
|
||||||
{
|
{
|
||||||
HitObjects = new List<HitObject> { new Hit { Type = HitType.Centre } },
|
HitObjects = new List<HitObject> { new Hit { Type = HitType.Centre } },
|
||||||
BeatmapInfo = new BeatmapInfo
|
BeatmapInfo = new BeatmapInfo
|
||||||
|
Loading…
Reference in New Issue
Block a user