Esempio n. 1
0
        private async void Load(int time)
        {
            GameplayScreenLoader.StartRotating();
            await Task.Delay(time);

            GameplayScreenLoader.StopRotating();
            Schedule(() => GameplayScreenLoader.FadeOut(time, Easing.In).Delay(time).Finally((action) =>
            {
                GameplayScreenLoader.Expire();
                RemoveInternal(GameplayScreenLoader);

                GameplayScreenLoader = null;
            }));

            await Task.Delay(time);

            GameStarted.Value = true;

            rhythmBoxClockContainer.Start();
            track?.Start();

            rhythmBoxClockContainer.Seek(_map.StartTime);
            track?.Seek(_map.StartTime);

            if (!hpbar.Enabled.Value)
            {
                return;
            }
            hpbar.Drain(false);
        }
        private void Load()
        {
            Child = gameplayScreenLoader = new GameplayScreenLoader
            {
                RelativeSizeAxes = Axes.Both,
                Size             = new Vector2(1f),
                Anchor           = Anchor.Centre,
                Origin           = Anchor.Centre,
            };

            AddStep("Start loading", () => gameplayScreenLoader.StartRotating());
            AddWaitStep("Wait", 20);

            AddStep("Stop loading", () => gameplayScreenLoader.StopRotating());
        }