Update to latest DI stuff

This commit is contained in:
Drew DeVault
2016-11-10 17:40:42 -05:00
parent 7327db307b
commit 0d4560a054
24 changed files with 481 additions and 436 deletions

View File

@ -16,16 +16,7 @@ namespace osu.Game.Graphics.Containers
public ParallaxContainer()
{
RelativeSizeAxes = Axes.Both;
}
private Container content;
protected override Container<Drawable> Content => content;
[Initializer]
private void Load()
{
AddInternal(content = new Container()
AddInternal(content = new Container
{
RelativeSizeAxes = Axes.Both,
Anchor = Anchor.Centre,
@ -33,6 +24,10 @@ namespace osu.Game.Graphics.Containers
});
}
private Container content;
protected override Container<Drawable> Content => content;
protected override bool OnMouseMove(InputState state)
{
content.Position = (state.Mouse.Position - DrawSize / 2) * ParallaxAmount;