Beispiel #1
0
        public void FadeOut()
        {
            if (Opacity != 1.0f)
            {
                return;
            }

            float duration = 2.0f;

            if (LoadScreenTip != null)
            {
                if (LoadScreenTip is GuessCharacter)
                {
                    GuessCharacter selected = (GuessCharacter)LoadScreenTip;
                    selected.Result = true;
                    duration        = duration + 3.0f;
                }
                else if (LoadScreenTip is Narration)
                {
                    Narration selected = (Narration)LoadScreenTip;
                    duration = duration + selected.ReadingTime;
                }
                else if (LoadScreenTip is GamingTip)
                {
                    GamingTip selected = (GamingTip)LoadScreenTip;
                    duration = duration + selected.ReadingTime;
                }
            }

            Fade = Animation.Tweener.Tween(this, new { Opacity = 0.0f }, duration);
            Fade.OnComplete(() => {
                Dispose();
            });
        }
Beispiel #2
0
        public void FadeOut()
        {
            if (Fade != null)
            {
                return;
            }

            float duration = 2.0f;

            if (this.CurrentLoadScreenTip != null)
            {
                if (this.CurrentLoadScreenTip is GuessCharacter)
                {
                    GuessCharacter selected = (GuessCharacter)this.CurrentLoadScreenTip;
                    selected.Result = true;
                    duration        = duration + 3.0f;
                }
                else if (this.CurrentLoadScreenTip is Narration)
                {
                    Narration selected = (Narration)this.CurrentLoadScreenTip;
                    duration = duration + selected.ReadingTime;
                }
                else if (this.CurrentLoadScreenTip is GamingTip)
                {
                    GamingTip selected = (GamingTip)this.CurrentLoadScreenTip;
                    duration = duration + selected.ReadingTime;
                }
            }
            Fade = Animation.Tweener.Tween(this, new { Opacity = 0.0f }, duration);
            Fade.OnComplete(() => {
                this.Visible = false;
                this.NextHint();
                Fade.Cancel();
                Fade = null;
            });
        }