1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-14 18:47:27 +08:00
osu-lazer/osu.Game/Beatmaps/DummyWorkingBeatmap.cs

89 lines
2.9 KiB
C#
Raw Normal View History

// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
2017-07-19 17:02:11 +08:00
using System;
using System.Collections.Generic;
using osu.Framework.Audio.Track;
using osu.Framework.Graphics.Textures;
2017-07-19 08:59:47 +08:00
using osu.Game.Rulesets;
using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Objects;
2017-07-19 08:59:47 +08:00
using osu.Game.Rulesets.Scoring;
using osu.Game.Rulesets.UI;
using osu.Game.Screens.Play;
namespace osu.Game.Beatmaps
{
internal class DummyWorkingBeatmap : WorkingBeatmap
{
2017-07-19 12:32:16 +08:00
private readonly OsuGameBase game;
2017-07-18 16:59:43 +08:00
2017-07-19 12:32:16 +08:00
public DummyWorkingBeatmap(OsuGameBase game)
: base(new BeatmapInfo
{
Metadata = new BeatmapMetadata
{
Artist = "please load a beatmap!",
Title = "no beatmaps available!",
Author = "no one",
},
BeatmapSet = new BeatmapSetInfo(),
Difficulty = new BeatmapDifficulty
{
DrainRate = 0,
CircleSize = 0,
OverallDifficulty = 0,
ApproachRate = 0,
SliderMultiplier = 0,
SliderTickRate = 0,
},
2017-07-19 08:59:47 +08:00
Ruleset = new DummyRulesetInfo()
})
{
2017-07-18 16:59:43 +08:00
this.game = game;
}
protected override Beatmap GetBeatmap() => new Beatmap
{
HitObjects = new List<HitObject>(),
};
2017-07-18 16:59:43 +08:00
protected override Texture GetBackground() => game.Textures.Get(@"Backgrounds/bg4");
protected override Track GetTrack() => new TrackVirtual();
2017-07-19 08:59:47 +08:00
private class DummyRulesetInfo : RulesetInfo
{
public override Ruleset CreateInstance() => new DummyRuleset(this);
2017-07-19 08:59:47 +08:00
private class DummyRuleset : Ruleset
{
public override IEnumerable<Mod> GetModsFor(ModType type) => new Mod[] { };
2017-08-04 00:25:24 +08:00
public override Mod GetAutoplayMod() => new ModAutoplay();
2017-08-09 12:28:29 +08:00
public override RulesetContainer CreateRulesetContainerWith(WorkingBeatmap beatmap, bool isForCurrentRuleset)
2017-07-19 08:59:47 +08:00
{
2017-07-19 17:02:11 +08:00
throw new NotImplementedException();
2017-07-19 08:59:47 +08:00
}
public override DifficultyCalculator CreateDifficultyCalculator(Beatmap beatmap) => null;
public override ScoreProcessor CreateScoreProcessor()
{
2017-07-19 17:02:11 +08:00
throw new NotImplementedException();
2017-07-19 08:59:47 +08:00
}
public override string Description => "dummy";
public override IEnumerable<KeyCounter> CreateGameplayKeys() => new List<KeyCounter>();
public DummyRuleset(RulesetInfo rulesetInfo)
: base(rulesetInfo)
{
}
2017-07-19 08:59:47 +08:00
}
}
}
}