/// <inheritdoc /> public override void Hide() { _animFadeLifecycle?.Cancel(); _animFadeLifecycle = null; this.Parent = null; base.Hide(); }
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; }); }