2017-02-07 13:59:30 +09:00
|
|
|
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
|
|
|
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
2016-09-02 19:25:13 +09:00
|
|
|
|
|
2017-03-10 15:08:53 +09:00
|
|
|
|
using osu.Game.Beatmaps;
|
2016-11-14 19:49:29 +09:00
|
|
|
|
using osu.Game.Modes.Objects.Drawables;
|
2017-03-12 14:32:50 +09:00
|
|
|
|
using osu.Game.Modes.Osu.Beatmaps;
|
2017-03-15 19:23:42 +09:00
|
|
|
|
using osu.Game.Modes.Osu.Judgements;
|
2016-11-16 16:16:45 +09:00
|
|
|
|
using osu.Game.Modes.Osu.Objects;
|
2016-11-16 16:20:58 +09:00
|
|
|
|
using osu.Game.Modes.Osu.Objects.Drawables;
|
2016-11-14 18:54:24 +09:00
|
|
|
|
using osu.Game.Modes.UI;
|
2017-03-14 16:00:35 +09:00
|
|
|
|
using osu.Game.Screens.Play;
|
2016-09-02 19:25:13 +09:00
|
|
|
|
|
2016-11-14 18:54:24 +09:00
|
|
|
|
namespace osu.Game.Modes.Osu.UI
|
2016-09-02 19:25:13 +09:00
|
|
|
|
{
|
2017-03-15 18:55:38 +09:00
|
|
|
|
public class OsuHitRenderer : HitRenderer<OsuHitObject, OsuJudgementInfo>
|
2016-09-02 19:25:13 +09:00
|
|
|
|
{
|
2017-03-12 18:03:13 +09:00
|
|
|
|
public OsuHitRenderer(WorkingBeatmap beatmap)
|
2017-03-10 15:08:53 +09:00
|
|
|
|
: base(beatmap)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2017-03-16 12:40:35 +09:00
|
|
|
|
public override ScoreProcessor CreateScoreProcessor() => new OsuScoreProcessor(this);
|
|
|
|
|
|
2017-03-12 14:32:50 +09:00
|
|
|
|
protected override IBeatmapConverter<OsuHitObject> CreateBeatmapConverter() => new OsuBeatmapConverter();
|
2017-03-12 02:26:10 +09:00
|
|
|
|
|
2017-03-14 17:01:21 +09:00
|
|
|
|
protected override IBeatmapProcessor<OsuHitObject> CreateBeatmapProcessor() => new OsuBeatmapProcessor();
|
2016-10-10 17:17:26 +09:00
|
|
|
|
|
2017-03-16 12:40:35 +09:00
|
|
|
|
protected override Playfield<OsuHitObject, OsuJudgementInfo> CreatePlayfield() => new OsuPlayfield();
|
2016-10-10 17:17:26 +09:00
|
|
|
|
|
2017-03-14 16:00:35 +09:00
|
|
|
|
protected override KeyConversionInputManager CreateKeyConversionInputManager() => new OsuKeyConversionInputManager();
|
|
|
|
|
|
2017-03-15 18:55:38 +09:00
|
|
|
|
protected override DrawableHitObject<OsuHitObject, OsuJudgementInfo> GetVisualRepresentation(OsuHitObject h)
|
2016-11-17 21:29:35 +09:00
|
|
|
|
{
|
2017-03-07 10:59:19 +09:00
|
|
|
|
var circle = h as HitCircle;
|
|
|
|
|
if (circle != null)
|
|
|
|
|
return new DrawableHitCircle(circle);
|
|
|
|
|
|
|
|
|
|
var slider = h as Slider;
|
|
|
|
|
if (slider != null)
|
|
|
|
|
return new DrawableSlider(slider);
|
|
|
|
|
|
|
|
|
|
var spinner = h as Spinner;
|
|
|
|
|
if (spinner != null)
|
|
|
|
|
return new DrawableSpinner(spinner);
|
2016-11-17 21:29:35 +09:00
|
|
|
|
return null;
|
|
|
|
|
}
|
2016-09-02 19:25:13 +09:00
|
|
|
|
}
|
|
|
|
|
}
|