protected override void OnUpdate(float factor) { Color color = (this.@from * (1f - factor)) + (this.to * factor); if (this.isFullscreen) { GameFullscreen instance = ImageEffectManager.GetInstance <GameFullscreen>(); if (instance) { instance.autoFadeColor = color; } color.a = 0f; } this.color = color; }
private void OnDisable() { GameFullscreen instance = ImageEffectManager.GetInstance <GameFullscreen>(); int lastShowFlags = this.lastShowFlags; this.lastShowFlags = 0; if ((lastShowFlags & 1) == 1) { instance.overlays[0].texture = null; } if ((lastShowFlags & 2) == 2) { instance.overlays[1].texture = null; } }
private void LateUpdate() { float num; float num2; GameFullscreen instance = ImageEffectManager.GetInstance <GameFullscreen>(); int num3 = this.UpdateFadeValues(out num, out num2); int num4 = num3 ^ this.lastShowFlags; this.lastShowFlags = num3; if (num4 != 0) { if ((num4 & 1) == 1) { if ((num3 & 1) == 1) { instance.overlays[0].texture = this.damageOverlay; instance.overlays[0].pass = 3; } else { instance.overlays[0].texture = null; } } if ((num4 & 2) == 2) { if ((num3 & 2) == 2) { instance.overlays[1].texture = this.damageOverlay2; instance.overlays[1].pass = 3; } else { instance.overlays[1].texture = null; } } } if ((num3 & 1) == 1) { instance.overlays[0].alpha = num; } if ((num3 & 2) == 2) { instance.overlays[1].alpha = num2; } }
private void LateUpdate() { float single; float single1; GameFullscreen instance = ImageEffectManager.GetInstance <GameFullscreen>(); int num = this.UpdateFadeValues(out single, out single1); int num1 = num ^ this.lastShowFlags; this.lastShowFlags = num; if (num1 != 0) { if ((num1 & 1) == 1) { if ((num & 1) != 1) { instance.overlays[0].texture = null; } else { instance.overlays[0].texture = this.damageOverlay; instance.overlays[0].pass = 3; } } if ((num1 & 2) == 2) { if ((num & 2) != 2) { instance.overlays[1].texture = null; } else { instance.overlays[1].texture = this.damageOverlay2; instance.overlays[1].pass = 3; } } } if ((num & 1) == 1) { instance.overlays[0].alpha = single; } if ((num & 2) == 2) { instance.overlays[1].alpha = single1; } }