예제 #1
0
        protected override void PopIn()
        {
            _text.Scale = new Vector2(0f);
            _text.MoveTo(new Vector2(0f));
            _text.Text = string.Empty;
            _text.AddText("Here are some mods!", x => x.Font = new FontUsage("Roboto", 100));

            this.FadeInFromZero(1000, Easing.In);

            _text.FadeInFromZero(1000, Easing.InBack);
            _text.ScaleTo(1f, 1250, Easing.OutElastic);
            _text.MoveToOffset(new Vector2(0f, -0.25f), 1000, Easing.OutElastic);

            base.PopIn();
        }
예제 #2
0
        public override void OnEntering(IScreen last)
        {
            base.OnEntering(last);

            using (BeginDelayedSequence(5000))
                textFlow.MoveToOffset(new Vector2(0, 250), 1000, Easing.Out);

            textFlow.FadeInFromZero(500).Then(4500).FadeOut(250);
            this.FadeInFromZero(500).Then(5000).FadeOut(250)
            .Finally(d =>
            {
                if (nextScreen != null)
                {
                    this.Push(nextScreen);
                }
            });
        }
예제 #3
0
        private void updateState()
        {
            if (!IsLoaded)
            {
                return;
            }

            const double duration = 900;

            switch (state)
            {
            case DisplayState.None:
                medalContainer.ScaleTo(0);
                break;

            case DisplayState.Icon:
                medalContainer
                .FadeIn(duration)
                .ScaleTo(1, duration, Easing.OutElastic);
                break;

            case DisplayState.MedalUnlocked:
                medalContainer
                .FadeTo(1)
                .ScaleTo(1);

                this.ScaleTo(scale_when_unlocked, duration, Easing.OutExpo);
                this.MoveToY(MedalOverlay.DISC_SIZE / 2 - 30, duration, Easing.OutExpo);
                unlocked.FadeInFromZero(duration);
                break;

            case DisplayState.Full:
                medalContainer
                .FadeTo(1)
                .ScaleTo(1);

                this.ScaleTo(scale_when_full, duration, Easing.OutExpo);
                this.MoveToY(MedalOverlay.DISC_SIZE / 2 - 60, duration, Easing.OutExpo);
                unlocked.Show();
                name.FadeInFromZero(duration + 100);
                description.FadeInFromZero(duration * 2);
                break;
            }
        }
예제 #4
0
        public override void OnEntering(IScreen last)
        {
            base.OnEntering(last);

            branding.Scale   = new Vector2(0.98f);
            disclaimer.Scale = new Vector2(0.98f);

            branding
            .FadeInFromZero(1000)
            .ScaleTo(1, 1000, Easing.OutCubic);

            disclaimer
            .FadeInFromZero(2000)
            .ScaleTo(1, 2000, Easing.OutCubic);

            Scheduler.AddDelayed(() =>
            {
                if (nextScreen != null)
                {
                    this.Push(nextScreen);
                }
            }, 5000);
        }