mirror of
https://github.com/ppy/osu.git
synced 2024-12-18 13:52:54 +08:00
4430255ec4
# Conflicts: # osu.Desktop.VisualTests/Tests/TestCasePlayer.cs # osu.Desktop/OsuGameDesktop.cs # osu.Game.Modes.Osu/Objects/Drawables/DrawableHitCircle.cs # osu.Game.Modes.Osu/Objects/Drawables/DrawableSlider.cs # osu.Game/Database/BeatmapDatabase.cs # osu.Game/Graphics/Cursor/OsuCursorContainer.cs # osu.Game/IPC/BeatmapImporter.cs # osu.Game/Modes/Mod.cs # osu.Game/Modes/Objects/Drawables/DrawableHitObject.cs # osu.Game/Modes/UI/Playfield.cs # osu.Game/Screens/Play/Player.cs # osu.Game/Screens/Play/PlayerInputManager.cs
35 lines
1.2 KiB
C#
35 lines
1.2 KiB
C#
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
|
|
using osu.Game.Modes.Objects;
|
|
using osu.Game.Modes.Objects.Drawables;
|
|
using osu.Game.Modes.Osu.Objects;
|
|
using osu.Game.Modes.Osu.Objects.Drawables;
|
|
using osu.Game.Modes.UI;
|
|
|
|
namespace osu.Game.Modes.Osu.UI
|
|
{
|
|
public class OsuHitRenderer : HitRenderer<OsuHitObject>
|
|
{
|
|
protected override HitObjectConverter<OsuHitObject> Converter => new OsuHitObjectConverter();
|
|
|
|
protected override Playfield<OsuHitObject> CreatePlayfield() => new OsuPlayfield();
|
|
|
|
protected override DrawableHitObject<OsuHitObject> GetVisualRepresentation(OsuHitObject h)
|
|
{
|
|
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);
|
|
return null;
|
|
}
|
|
}
|
|
}
|