Fix playfield position.

This commit is contained in:
smoogipooo 2017-05-11 14:26:00 +09:00
parent f6677125af
commit 623912b40a
2 changed files with 12 additions and 4 deletions

View File

@ -4,6 +4,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
using OpenTK;
using osu.Framework.Graphics;
using osu.Game.Beatmaps;
using osu.Game.Beatmaps.Timing;
using osu.Game.Rulesets.Beatmaps;
@ -31,7 +33,7 @@ public ManiaHitRenderer(WorkingBeatmap beatmap)
protected override Playfield<ManiaHitObject, ManiaJudgement> CreatePlayfield()
{
List<TimingSection> timingSections = new List<TimingSection>();
var timingSections = new List<TimingSection>();
// Construct all the relevant timing sections
ControlPoint lastTimingChange = null;
@ -74,7 +76,11 @@ protected override Playfield<ManiaHitObject, ManiaJudgement> CreatePlayfield()
}
}
return new ManiaPlayfield(Columns ?? (int)Math.Round(Beatmap.BeatmapInfo.Difficulty.CircleSize), timingSections);
return new ManiaPlayfield(Columns ?? (int)Math.Round(Beatmap.BeatmapInfo.Difficulty.CircleSize), timingSections)
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre
};
}
public override ScoreProcessor CreateScoreProcessor() => new ManiaScoreProcessor(this);
@ -93,5 +99,7 @@ protected override DrawableHitObject<ManiaHitObject, ManiaJudgement> GetVisualRe
return null;
}
protected override Vector2 GetPlayfieldAspectAdjust() => new Vector2(1, 0.8f);
}
}

View File

@ -73,8 +73,8 @@ public ManiaPlayfield(int columnCount, IEnumerable<TimingSection> timingSections
{
new Container
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Anchor = Anchor.BottomCentre,
Origin = Anchor.BottomCentre,
RelativeSizeAxes = Axes.Y,
AutoSizeAxes = Axes.X,
Children = new Drawable[]