private void Start() { lightingImageEffect_ = SceneGlobals.Instance.LightingImageEffect; startLight_ = LightingImageEffect.Instance.CurrentValues; baseAmbientColor_ = LightingImageEffect.Instance.CurrentValues.AmbientLight; ScaleAmbientLight(0.6f); nextFlash = Time.time + 2 + Random.value; CurrentRunData.Instance.Boss1Attempts++; golemKing_ = FindObjectOfType <GolemKingController>(); miniGolems_ = FindObjectsOfType <MiniGolemController>(); golems_ = FindObjectsOfType <GolemController>(); for (int i = 0; i < golems_.Length; ++i) { golems_[i].gameObject.SetActive(false); } GameEvents.OnGolemKingCallingForHelp += GameEvents_OnGolemKingCallingForHelp; GameEvents.OnAllEnemiesKilled += GameEvents_OnAllEnemiesKilled; nextLevelPortal_ = GameSceneLogic.Instance.NextLevelPortal; nextLevelPortal_.gameObject.SetActive(true); nextLevelPortal_.transform.position = Vector3.right * 800; Chest.SetActive(false); }
public void FlashColor(LightingEffectSettings flashTarget, AnimationCurve flashCurve, float flashTimeMs) { flash_ = flashTarget; flashTimeMs_ = flashTimeMs; flashCurve_ = flashCurve; flashStartTime_ = Time.unscaledTime; }
public void CopyTo(LightingEffectSettings other) { other.AmbientLight = AmbientLight; other.Brightness = Brightness; other.MonochromeAmount = MonochromeAmount; other.MonochromeFactorR = MonochromeFactorR; other.MonochromeFactorG = MonochromeFactorG; other.MonochromeFactorB = MonochromeFactorB; other.MonochromeDisplayR = MonochromeDisplayR; other.MonochromeDisplayG = MonochromeDisplayG; other.MonochromeDisplayB = MonochromeDisplayB; }
private void Awake() { Instance = this; CurrentValues = new LightingEffectSettings(); target_ = new LightingEffectSettings(); id_LightingTex = Shader.PropertyToID("_LightingTex"); id_Brightness = Shader.PropertyToID("_Brightness"); id_MonochromeAmount = Shader.PropertyToID("_MonochromeAmount"); id_MonochromeFactorR = Shader.PropertyToID("_MonochromeFactorR"); id_MonochromeFactorG = Shader.PropertyToID("_MonochromeFactorG"); id_MonochromeFactorB = Shader.PropertyToID("_MonochromeFactorB"); id_MonochromeDisplayR = Shader.PropertyToID("_MonochromeDisplayR"); id_MonochromeDisplayG = Shader.PropertyToID("_MonochromeDisplayG"); id_MonochromeDisplayB = Shader.PropertyToID("_MonochromeDisplayB"); id_Darkness = Shader.PropertyToID("_Darkness"); id_AspectRatio = Shader.PropertyToID("_AspectRatio"); SetBaseColor(StartValues); }
void SetLighting(LightingEffectSettings settings) { activeLightingSettings_ = settings; lightingImageEffect_.SetBaseColor(activeLightingSettings_); }
void LightingFadeTo(LightingEffectSettings settings, float transitionSpeed = 30) { activeLightingSettings_ = settings; lightingImageEffect_.SetBaseColorTarget(activeLightingSettings_, transitionSpeed: transitionSpeed); }
public void SetBaseColor(LightingEffectSettings baseColor) { target_ = baseColor; target_.CopyTo(CurrentValues); target_.CopyTo(transitionValues_); }
public void SetBaseColorTarget(LightingEffectSettings target, float transitionSpeed = 30) { target_ = target ?? throw new NullReferenceException(); baseTransitionSpeed_ = transitionSpeed; }