osu/osu.Game.Rulesets.Catch/UI/CatchRulesetContainer.cs

54 lines
2.1 KiB
C#
Raw Normal View History

2018-01-05 11:21:19 +00:00
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Input;
using osu.Game.Beatmaps;
2017-04-18 07:05:58 +00:00
using osu.Game.Rulesets.Catch.Beatmaps;
using osu.Game.Rulesets.Catch.Objects;
using osu.Game.Rulesets.Catch.Objects.Drawable;
2018-01-12 09:35:28 +00:00
using osu.Game.Rulesets.Catch.Replays;
2017-04-18 07:05:58 +00:00
using osu.Game.Rulesets.Catch.Scoring;
using osu.Game.Rulesets.Objects.Drawables;
2018-01-12 09:35:28 +00:00
using osu.Game.Rulesets.Replays;
2017-04-18 07:05:58 +00:00
using osu.Game.Rulesets.Scoring;
using osu.Game.Rulesets.UI;
2018-01-04 10:22:15 +00:00
using osu.Game.Rulesets.UI.Scrolling;
2017-04-18 07:05:58 +00:00
namespace osu.Game.Rulesets.Catch.UI
{
public class CatchRulesetContainer : ScrollingRulesetContainer<CatchPlayfield, CatchHitObject>
{
2017-08-09 04:28:29 +00:00
public CatchRulesetContainer(Ruleset ruleset, WorkingBeatmap beatmap, bool isForCurrentRuleset)
: base(ruleset, beatmap, isForCurrentRuleset)
{
}
public override ScoreProcessor CreateScoreProcessor() => new CatchScoreProcessor(this);
2018-01-12 09:35:28 +00:00
protected override FramedReplayInputHandler CreateReplayInputHandler(Replay replay) => new CatchFramedReplayInputHandler(replay);
protected override BeatmapProcessor<CatchHitObject> CreateBeatmapProcessor() => new CatchBeatmapProcessor();
protected override BeatmapConverter<CatchHitObject> CreateBeatmapConverter() => new CatchBeatmapConverter();
protected override Playfield CreatePlayfield() => new CatchPlayfield(Beatmap.BeatmapInfo.BaseDifficulty);
public override PassThroughInputManager CreateInputManager() => new CatchInputManager(Ruleset.RulesetInfo);
protected override DrawableHitObject<CatchHitObject> GetVisualRepresentation(CatchHitObject h)
{
switch (h)
{
case Fruit fruit:
return new DrawableFruit(fruit);
case JuiceStream stream:
return new DrawableJuiceStream(stream);
case BananaShower banana:
return new DrawableBananaShower(banana);
}
return null;
}
}
}