protected override void DisposeControl() { _notificationLifecycle = null; VisibleNotifications--; base.DisposeControl(); }
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(); }); }
/// <inheritdoc /> public override void Hide() { _animFadeLifecycle?.Cancel(); _animFadeLifecycle = null; this.Parent = null; base.Hide(); }
private void Show() { _notificationLifecycle = Animation.Tweener .Tween(this, new { Opacity = 1f }, 0.2f) .Repeat(1) .RepeatDelay(this.Duration) .Reflect() .OnComplete(Dispose); }
private void Show(float duration) { Content.PlaySoundEffectByName(@"audio\color-change"); _notificationLifecycle = Animation.Tweener .Tween(this, new { Opacity = 1f }, 0.2f) .Repeat(1) .RepeatDelay(duration) .Reflect() .OnComplete(Dispose); }
/// <inheritdoc /> public override void Show() { this.Opacity = 0f; if (_animFadeLifecycle == null) { _animFadeLifecycle = Animation.Tweener.Tween(this, new { Opacity = 1f }, 0.1f); } this.Parent = Graphics.SpriteScreen; base.Show(); }
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; }); }