mirror of
https://github.com/ppy/osu.git
synced 2025-03-11 15:27:20 +08:00
Fix map would always be converted to itself when actually converting to a different game mode.
This commit is contained in:
parent
f484792546
commit
b0ea282a06
@ -15,6 +15,8 @@ namespace osu.Game.Modes.Catch.UI
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override PlayMode PlayMode => PlayMode.Catch;
|
||||||
|
|
||||||
protected override Playfield<CatchBaseHit> CreatePlayfield() => new CatchPlayfield();
|
protected override Playfield<CatchBaseHit> CreatePlayfield() => new CatchPlayfield();
|
||||||
|
|
||||||
protected override DrawableHitObject<CatchBaseHit> GetVisualRepresentation(CatchBaseHit h) => null;// new DrawableFruit(h);
|
protected override DrawableHitObject<CatchBaseHit> GetVisualRepresentation(CatchBaseHit h) => null;// new DrawableFruit(h);
|
||||||
|
@ -18,6 +18,8 @@ namespace osu.Game.Modes.Mania.UI
|
|||||||
this.columns = columns;
|
this.columns = columns;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override PlayMode PlayMode => PlayMode.Mania;
|
||||||
|
|
||||||
protected override Playfield<ManiaBaseHit> CreatePlayfield() => new ManiaPlayfield(columns);
|
protected override Playfield<ManiaBaseHit> CreatePlayfield() => new ManiaPlayfield(columns);
|
||||||
|
|
||||||
protected override DrawableHitObject<ManiaBaseHit> GetVisualRepresentation(ManiaBaseHit h)
|
protected override DrawableHitObject<ManiaBaseHit> GetVisualRepresentation(ManiaBaseHit h)
|
||||||
|
@ -16,6 +16,8 @@ namespace osu.Game.Modes.Osu.UI
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override PlayMode PlayMode => PlayMode.Osu;
|
||||||
|
|
||||||
protected override Playfield<OsuHitObject> CreatePlayfield() => new OsuPlayfield();
|
protected override Playfield<OsuHitObject> CreatePlayfield() => new OsuPlayfield();
|
||||||
|
|
||||||
protected override DrawableHitObject<OsuHitObject> GetVisualRepresentation(OsuHitObject h)
|
protected override DrawableHitObject<OsuHitObject> GetVisualRepresentation(OsuHitObject h)
|
||||||
|
@ -15,6 +15,8 @@ namespace osu.Game.Modes.Taiko.UI
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override PlayMode PlayMode => PlayMode.Taiko;
|
||||||
|
|
||||||
protected override Playfield<TaikoBaseHit> CreatePlayfield() => new TaikoPlayfield();
|
protected override Playfield<TaikoBaseHit> CreatePlayfield() => new TaikoPlayfield();
|
||||||
|
|
||||||
protected override DrawableHitObject<TaikoBaseHit> GetVisualRepresentation(TaikoBaseHit h) => null;// new DrawableTaikoHit(h);
|
protected override DrawableHitObject<TaikoBaseHit> GetVisualRepresentation(TaikoBaseHit h) => null;// new DrawableTaikoHit(h);
|
||||||
|
@ -87,9 +87,9 @@ namespace osu.Game.Beatmaps
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <typeparam name="T">The type of HitObject the new Beatmap should contain.</typeparam>
|
/// <typeparam name="T">The type of HitObject the new Beatmap should contain.</typeparam>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public Beatmap<T> ConvertTo<T>() where T : HitObject
|
public Beatmap<T> ConvertTo<T>(PlayMode playMode) where T : HitObject
|
||||||
{
|
{
|
||||||
return Ruleset.GetRuleset(BeatmapInfo.Mode).CreateBeatmapConverter<T>().Convert(this);
|
return Ruleset.GetRuleset(playMode).CreateBeatmapConverter<T>().Convert(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,7 @@ namespace osu.Game.Beatmaps
|
|||||||
|
|
||||||
protected DifficultyCalculator(Beatmap beatmap)
|
protected DifficultyCalculator(Beatmap beatmap)
|
||||||
{
|
{
|
||||||
Objects = beatmap.ConvertTo<T>().HitObjects;
|
Objects = beatmap.ConvertTo<T>(PlayMode).HitObjects;
|
||||||
PreprocessHitObjects();
|
PreprocessHitObjects();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,15 +50,16 @@ namespace osu.Game.Modes.UI
|
|||||||
protected override Container<Drawable> Content => content;
|
protected override Container<Drawable> Content => content;
|
||||||
protected override bool AllObjectsJudged => Playfield.HitObjects.Children.All(h => h.Judgement.Result.HasValue);
|
protected override bool AllObjectsJudged => Playfield.HitObjects.Children.All(h => h.Judgement.Result.HasValue);
|
||||||
|
|
||||||
protected Playfield<TObject> Playfield;
|
protected abstract PlayMode PlayMode { get; }
|
||||||
|
|
||||||
|
protected Playfield<TObject> Playfield;
|
||||||
protected Beatmap<TObject> Beatmap;
|
protected Beatmap<TObject> Beatmap;
|
||||||
|
|
||||||
private Container content;
|
private Container content;
|
||||||
|
|
||||||
protected HitRenderer(Beatmap beatmap)
|
protected HitRenderer(Beatmap beatmap)
|
||||||
{
|
{
|
||||||
Beatmap = beatmap.ConvertTo<TObject>();
|
Beatmap = beatmap.ConvertTo<TObject>(PlayMode);
|
||||||
|
|
||||||
RelativeSizeAxes = Axes.Both;
|
RelativeSizeAxes = Axes.Both;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user