public override void Update() { float num = this.stick; if (this.scanStage < 2) { Level.current.backgroundColor = Lerp.Color(Level.current.backgroundColor, this.backgroundColor, 0.04f); num = 0.0f; } else if (this._realBackground != null) { Level.current.backgroundColor = Lerp.Color(Level.current.backgroundColor, this._realBackground.backgroundColor, 0.04f); } Rectangle rectangle1 = new Rectangle((float)(int)((1.0 - (double)num) * (double)Graphics.width), 0.0f, (float)(Graphics.width - (int)((1.0 - (double)num) * (double)Graphics.width)), (float)Graphics.height); if (this._realBackground != null) { if ((double)rectangle1.width == 0.0) { this._realBackground.SetVisible(false); } else { this._realBackground.scissor = rectangle1; this._realBackground.SetVisible(true); } } Rectangle rectangle2 = new Rectangle(0.0f, 0.0f, (float)Graphics.width - rectangle1.width, (float)Graphics.height); if ((double)rectangle2.width == 0.0) { this.SetVisible(false); this.visible = false; } else { this.scissor = rectangle2; this.SetVisible(true); this.visible = true; } if (this.virtualMode && this.done && this.scanStage == 3) { --this.scanStage; } else if (!this.virtualMode && !this.done && this.scanStage == -1) { ++this.scanStage; } float amount1 = 0.04f; float amount2 = 0.06f; if (Level.current != null) { amount1 *= Level.current.transitionSpeedMultiplier; amount2 *= Level.current.transitionSpeedMultiplier; } if (!this.done) { if (this.scanStage == 0) { this.stick = Lerp.Float(this.stick, 1f, amount1); if ((double)this.stick > 0.949999988079071) { this.stick = 1f; this.incStage = true; } } else if (this.scanStage == 1) { this.stick = Lerp.Float(this.stick, 0.0f, amount1); if ((double)this.stick < 0.0500000007450581) { this.stick = 0.0f; this.incStage = true; } } else if (this.scanStage == 2) { this.stick = Lerp.Float(this.stick, 1f, amount1); if ((double)this.stick > 0.949999988079071) { this.stick = 1f; this.incStage = true; this.done = true; } } } else if (this.scanStage == 2) { this.stick = Lerp.Float(this.stick, 0.0f, amount2); if ((double)this.stick < 0.0500000007450581) { this.stick = 0.0f; this.decStage = true; } } else if (this.scanStage == 1) { this.stick = Lerp.Float(this.stick, 1f, amount2); if ((double)this.stick > 0.949999988079071) { this.stick = 1f; this.decStage = true; } } else if (this.scanStage == 0) { this.stick = Lerp.Float(this.stick, 0.0f, amount2); if ((double)this.stick < 0.0500000007450581) { this.stick = 0.0f; this.decStage = true; this.done = false; } } if (this.scanStage < 2) { Layer.basicWireframeEffect.effect.Parameters["screenCross"].SetValue(this.stick); Layer.basicWireframeTex = this.scanStage == 1; } if (this.incStage) { this.incStage = false; ++this.scanStage; } if (this.decStage) { this.decStage = false; --this.scanStage; } this.fullyVirtual = false; this.fullyNonVirtual = false; if (this.scanStage == 3) { this.needsWireframe = false; this.fullyNonVirtual = true; } else { this.needsWireframe = true; if (this.scanStage == -1) { this.fullyVirtual = true; } } base.Update(); }