Пример #1
0
            protected override void Confirm()
            {
                base.Confirm();

                // temporarily unbind as to not look weird if releasing during confirm animation (can see the unwind of progress).
                Progress.UnbindAll();

                // avoid starting a new confirm call until we finish animating.
                pendingAnimation = true;

                AbortConfirm();

                overlayCircle.ScaleTo(0, 100)
                .Then().FadeOut().ScaleTo(1).FadeIn(500)
                .OnComplete(a =>
                {
                    icon.ScaleTo(1, 100);
                    circularProgress.FadeOut(100).OnComplete(_ =>
                    {
                        bind();

                        circularProgress.FadeIn();
                        pendingAnimation = false;
                    });
                });
            }
Пример #2
0
        private void updateState(ValueChangedEvent <ArmedState> state)
        {
            Glow.FadeOut(400);

            switch (state.NewValue)
            {
            case ArmedState.Hit:
                const double flash_in  = 40;
                const double flash_out = 100;

                flash.Delay(Duration).FadeTo(0.8f, flash_in)
                .Then()
                .FadeOut(flash_out);

                explode.Delay(Duration).FadeIn(flash_in);
                this.Delay(Duration).ScaleTo(1.5f, 400, Easing.OutQuad);

                using (BeginDelayedSequence(Duration + flash_in, true))
                {
                    //after the flash, we can hide some elements that were behind it
                    progress.FadeOut();
                    fillCircle.FadeOut();
                    outline.FadeOut();
                    ring.FadeOut();
                    text.FadeOut();

                    this.FadeOut(800);
                }
                break;
            }
        }
Пример #3
0
            protected override void endTracking()
            {
                inactiveOverlay.FadeIn(80);
                circularProgress.FadeOut(80);
                circularProgress.AlwaysDraw = false;

                Transformation returnto = new TransformationF(TransformationType.Scale, spriteCollectionStart[0].ScaleScalar, 1, ClockingNow, ClockingNow + 150, EasingTypes.In);

                foreach (pDrawable p in spriteCollectionStart)
                {
                    p.Transformations.RemoveAll(t => t.Type == TransformationType.Scale);
                    p.Transform(returnto);
                }

                border.Transformations.RemoveAll(t => t.Type == TransformationType.Scale);
                border.Transform(returnto);
            }