public override void Update() { if (!this._skip && Vote.Passed(VoteType.Skip)) { this._skip = true; } if (this._skip) { this._fadeOut = true; } DuckGame.Graphics.fade = Lerp.Float(DuckGame.Graphics.fade, this._fadeOut ? 0.0f : 1f, 0.02f); if ((double)DuckGame.Graphics.fade < 0.00999999977648258 && this._skip) { HighlightLevel.didSkip = true; Vote.CloseVoting(); Level.current = !Main.isDemo ? (Level) new RockScoreboard(RockScoreboard.returnLevel, ScoreBoardMode.ShowWinner, true) : (Level) new HighlightLevel(true); } if (!this._showHighlight && (double)DuckGame.Graphics.fade > 0.949999988079071) { this._waitToShow -= 0.02f; if ((double)this._waitToShow <= 0.0) { this._waitToShow = 0.0f; this._fadeOut = true; } } if ((double)DuckGame.Graphics.fade < 0.00999999977648258 && !this._showHighlight && this._fadeOut) { this._fadeOut = false; this._showHighlight = true; } if (this._showHighlight && (double)DuckGame.Graphics.fade > 0.949999988079071) { this._keepPaused -= 0.03f; } if (!this._highlights[this._currentHighlight].finished) { return; } this._endWait -= 0.03f; if ((double)this._endWait > 0.0) { return; } this._fadeOut = true; if ((double)DuckGame.Graphics.fade >= 0.00999999977648258) { return; } int highlight = this._currentHighlight - 1; if (this._currentHighlight == 0) { Level.current = (Level) new HighlightLevel(true); } else { Level.current = (Level) new HighlightPlayback(highlight); } }
public override void Update() { if (this._testMode) { this._wait += Maths.IncFrameTimer(); if (Keyboard.Pressed(Keys.F5) || (double)this._wait > 0.1) { this._wait = 0.0f; try { this._tie = new SpriteMap((Tex2D)ContentPack.LoadTexture2D("tieTest.png"), 64, 64); this._tie.center = new Vec2(26f, 27f); } catch (Exception ex) { } } } DuckGame.Graphics.fadeAdd = Lerp.Float(DuckGame.Graphics.fadeAdd, 0.0f, 0.01f); if (Main.isDemo && this._skip && !this._firedSkipLogic) { this._firedSkipLogic = true; Vote.CloseVoting(); HUD.CloseAllCorners(); this.DoSkip(); } if ((double)DuckGame.Graphics.fade > 0.990000009536743 && !this._skip && Vote.Passed(VoteType.Skip)) { this._skip = true; } if (this._talker.finished || !HighlightLevel._cancelSkip && this._skip && !Main.isDemo) { this._done -= 0.04f; } DuckGame.Graphics.fade = Lerp.Float(DuckGame.Graphics.fade, (double)this._done < 0.0 ? 0.0f : 1f, 0.02f); if ((double)DuckGame.Graphics.fade < 0.00999999977648258 && (this._talker.finished || this._skip)) { if (this._endOfHighlights || this._skip) { Vote.CloseVoting(); Level.current = (Level) new RockScoreboard(RockScoreboard.returnLevel, ScoreBoardMode.ShowWinner, true); } else { Level.current = (Level) new HighlightPlayback(4); } } if (this._state == TVState.ShowPedestals) { this._waitZoom -= 0.008f; if ((double)this._waitZoom < 0.00999999977648258) { this._waitZoom = 0.0f; this._desiredState = TVState.ShowNewscaster; } } if (this._state == TVState.ShowHotness && this._hotness.ready) { this._talker.Resume(); } if (this._state == TVState.ShowInterview) { this._interviewWait -= 0.02f; if ((double)this._interviewWait < 0.0 && !this._askedQuestion) { this._talker.InsertLine(Script.winner() + "! To what do you attribute your success?", this._interviewIndex); this._talker.Resume(); this._askedQuestion = true; } } this._cameraOffset.x = Lerp.Float(this._cameraOffset.x, HighlightLevel._image != null ? 20f : 0.0f, 2f); this._talker.active = this._talker.visible = this._state != TVState.ShowPedestals; if (this._state == this._desiredState) { return; } this._talker.active = false; this._transition.PlaySwipe(); if (!this._transition.doTransition) { return; } this._state = this._desiredState; }