// Copyright (c) 2007-2018 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using osu.Framework.Allocation; using osu.Framework.Graphics; using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Textures; namespace osu.Game.Overlays.AccountCreation { public class AccountCreationBackground : Sprite { 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(); } } } }