Adjust mascot positioning in playfield layout

This commit is contained in:
Bartłomiej Dach 2020-05-01 00:19:12 +02:00
parent f5526890cc
commit 1e7b10320f
3 changed files with 12 additions and 7 deletions

View File

@ -28,7 +28,7 @@ public class DrawableTaikoMascot : BeatSyncedContainer
public DrawableTaikoMascot(TaikoMascotAnimationState startingState = TaikoMascotAnimationState.Idle) public DrawableTaikoMascot(TaikoMascotAnimationState startingState = TaikoMascotAnimationState.Idle)
{ {
RelativeSizeAxes = Axes.Both; Origin = Anchor = Anchor.BottomLeft;
state = new Bindable<TaikoMascotAnimationState>(startingState); state = new Bindable<TaikoMascotAnimationState>(startingState);
animations = new Dictionary<TaikoMascotAnimationState, TaikoMascotAnimation>(); animations = new Dictionary<TaikoMascotAnimationState, TaikoMascotAnimation>();

View File

@ -10,6 +10,7 @@
using osu.Game.Beatmaps.ControlPoints; using osu.Game.Beatmaps.ControlPoints;
using osu.Game.Graphics.Containers; using osu.Game.Graphics.Containers;
using osu.Game.Skinning; using osu.Game.Skinning;
using osuTK;
namespace osu.Game.Rulesets.Taiko.UI namespace osu.Game.Rulesets.Taiko.UI
{ {
@ -24,6 +25,7 @@ public TaikoMascotAnimation(TaikoMascotAnimationState state)
InternalChild = textureAnimation = createTextureAnimation(state).With(animation => InternalChild = textureAnimation = createTextureAnimation(state).With(animation =>
{ {
animation.Origin = animation.Anchor = Anchor.BottomLeft; animation.Origin = animation.Anchor = Anchor.BottomLeft;
animation.Scale = new Vector2(0.6f);
}); });
RelativeSizeAxes = Axes.Both; RelativeSizeAxes = Axes.Both;

View File

@ -130,18 +130,21 @@ private void load(OsuColour colours)
}, },
} }
}, },
mascotDrawable = new SkinnableDrawable(new TaikoSkinComponent(TaikoSkinComponents.TaikoDon), _ => Empty())
{
Origin = Anchor.BottomLeft,
Anchor = Anchor.TopLeft,
RelativePositionAxes = Axes.None,
RelativeSizeAxes = Axes.None,
X = 15,
Y = 45
},
topLevelHitContainer = new ProxyContainer topLevelHitContainer = new ProxyContainer
{ {
Name = "Top level hit objects", Name = "Top level hit objects",
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
}, },
drumRollHitContainer.CreateProxy(), drumRollHitContainer.CreateProxy(),
mascotDrawable = new SkinnableDrawable(new TaikoSkinComponent(TaikoSkinComponents.TaikoDon), _ => new Container(), confineMode: ConfineMode.ScaleToFit)
{
Origin = Anchor.BottomLeft,
Anchor = Anchor.TopLeft,
RelativePositionAxes = Axes.None
}
}; };
} }