2023-06-23 00:37:25 +08:00
|
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
2019-01-24 16:43:03 +08:00
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
2018-12-06 10:58:09 +08:00
|
|
|
|
|
2018-12-04 19:33:29 +08:00
|
|
|
|
using osu.Framework.Allocation;
|
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
|
using osu.Framework.Graphics.Sprites;
|
|
|
|
|
using osu.Framework.Graphics.Textures;
|
|
|
|
|
|
|
|
|
|
namespace osu.Game.Overlays.AccountCreation
|
|
|
|
|
{
|
2022-11-24 13:32:20 +08:00
|
|
|
|
public partial class AccountCreationBackground : Sprite
|
2018-12-04 19:33:29 +08:00
|
|
|
|
{
|
|
|
|
|
public AccountCreationBackground()
|
|
|
|
|
{
|
|
|
|
|
FillMode = FillMode.Fill;
|
|
|
|
|
RelativeSizeAxes = Axes.Both;
|
|
|
|
|
|
|
|
|
|
Anchor = Anchor.CentreRight;
|
|
|
|
|
Origin = Anchor.CentreRight;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[BackgroundDependencyLoader]
|
|
|
|
|
private void load(LargeTextureStore textures)
|
|
|
|
|
{
|
|
|
|
|
Texture = textures.Get("Backgrounds/registration");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void LoadComplete()
|
|
|
|
|
{
|
|
|
|
|
const float x_movement = 80;
|
|
|
|
|
|
|
|
|
|
const float initial_move_time = 5000;
|
|
|
|
|
const float loop_move_time = 10000;
|
|
|
|
|
|
|
|
|
|
base.LoadComplete();
|
|
|
|
|
this.FadeInFromZero(initial_move_time / 4, Easing.OutQuint);
|
|
|
|
|
this.MoveToX(x_movement / 2).MoveToX(0, initial_move_time, Easing.OutQuint);
|
|
|
|
|
|
|
|
|
|
using (BeginDelayedSequence(initial_move_time))
|
|
|
|
|
{
|
|
|
|
|
this
|
|
|
|
|
.MoveToX(x_movement, loop_move_time, Easing.InOutSine)
|
|
|
|
|
.Then().MoveToX(0, loop_move_time, Easing.InOutSine)
|
|
|
|
|
.Loop();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|