osu/osu.Game.Modes.Osu/UI/OsuHitRenderer.cs

30 lines
1.0 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
2016-09-02 10:25:13 +00:00
2016-11-14 09:03:20 +00:00
using osu.Game.Modes.Objects;
2016-11-14 10:49:29 +00:00
using osu.Game.Modes.Objects.Drawables;
2016-11-16 07:16:45 +00:00
using osu.Game.Modes.Osu.Objects;
2016-11-16 07:20:58 +00:00
using osu.Game.Modes.Osu.Objects.Drawables;
2016-11-14 09:54:24 +00:00
using osu.Game.Modes.UI;
2016-09-02 10:25:13 +00:00
2016-11-14 09:54:24 +00:00
namespace osu.Game.Modes.Osu.UI
2016-09-02 10:25:13 +00:00
{
public class OsuHitRenderer : HitRenderer<OsuHitObject>
2016-09-02 10:25:13 +00:00
{
protected override HitObjectConverter<OsuHitObject> Converter => new OsuHitObjectConverter();
2016-09-02 10:25:13 +00:00
protected override Playfield CreatePlayfield() => new OsuPlayfield();
2016-10-10 08:17:26 +00:00
protected override DrawableHitObject GetVisualRepresentation(OsuHitObject h)
2016-11-17 12:29:35 +00:00
{
if (h is HitCircle)
return new DrawableHitCircle(h as HitCircle);
if (h is Slider)
return new DrawableSlider(h as Slider);
if (h is Spinner)
return new DrawableSpinner(h as Spinner);
2016-11-17 12:29:35 +00:00
return null;
}
2016-09-02 10:25:13 +00:00
}
}