Beispiel #1
0
 private void OnDestroy()
 {
     if (ppVolume != null)
     {
         RuntimeUtilities.DestroyVolume(ppVolume, true, true);
     }
 }
Beispiel #2
0
 private void OnDestroy()
 {
     if (_postProcessVolume != null)
     {
         RuntimeUtilities.DestroyVolume(_postProcessVolume, true, true);
     }
 }
        ///Disable the Director Camera, while enabling back the main camera if any
        public static void Disable()
        {
            if (onDeactivate != null)
            {
                onDeactivate();
            }

            //disable render camera
            if (autoHandleActiveState)
            {
                renderCamera.gameObject.SetActive(false);
            }

            //reset tag
            if (setMainWhenActive)
            {
                renderCamera.gameObject.tag = "Untagged";
            }

            //enable gamecamera
            if (gameCamera != null)
            {
                gameCamera.gameObject.SetActive(true);
            }

#if SLATE_USE_POSTSTACK
            if (quickPostVolume != null)
            {
                RuntimeUtilities.DestroyVolume(quickPostVolume, true, true);
            }
#endif

            isEnabled = false;
        }
Beispiel #4
0
 void DestroyCurrentMood()
 {
     if (Volume != null)
     {
         RuntimeUtilities.DestroyVolume(Volume, true, true);
     }
 }
 void OnDestroy()
 {
     if (null != m_Volume)
     {
         RuntimeUtilities.DestroyVolume(m_Volume, true, true);
     }
 }
 public override void OnPlayableDestroy(Playable playable)
 {
     if (postProcessVolume != null)
     {
         GameObject go = postProcessVolume.gameObject;
         RuntimeUtilities.DestroyVolume(postProcessVolume, false);
         RuntimeUtilities.Destroy(go);
     }
 }
 public void End()
 {
     if (Routine != null)
     {
         StopCoroutine(Routine);
     }
     RuntimeUtilities.DestroyVolume(volume, true, true);
     Destroy(this.GetComponent <ChromaticAbrevEffect>());
 }
Beispiel #8
0
 public void End()
 {
     if (Routine != null)
     {
         StopCoroutine(Routine);
     }
     RuntimeUtilities.DestroyVolume(volume, true, true);
     //Destroy(this);
 }
 public void DestroyPostProcessVolume(string key)
 {
     if (activeVolumes.ContainsKey(key))
     {
         RuntimeUtilities.DestroyVolume(activeVolumes[key], false);
         activeVolumes.Remove(key);
     }
     else
     {
         Debug.Log(key + " is not a valid key in activeVolumes");
     }
 }
Beispiel #10
0
    public override void DestroyVolume()
    {
        if (mVolume == null)
        {
            return;
        }

        RuntimeUtilities.DestroyVolume(mVolume, true, true);
        mVolume = null;

        VFXVolumeDestroyed();
    }
 public virtual void End()
 {
     if (Routine != null)
     {
         StopCoroutine(Routine);
     }
     if (volume != null)
     {
         RuntimeUtilities.DestroyVolume(volume, true, true);
     }
     if (destroy)
     {
         Destroy(this.gameObject);
     }
 }
Beispiel #12
0
        private void DisplayHealthToUI()
        {
            var currentHealthAmount = playerHealthSetter.GetCurrentHealth();
            var maxHealthAmount     = playerHealthSetter.maxHealthAmount;
            var healthRatio         = currentHealthAmount / maxHealthAmount;

            if (healthRatio <= 0.5f)
            {
                if (!_postProcessOverrideApplied)
                {
                    CreateOverrideVignetteEffect();
                    _postProcessVolume = PostProcessManager.instance.QuickVolume(
                        PostProcessLayer,
                        PostProcessOverridePriority,
                        _healthVignette
                        );
                    _postProcessOverrideApplied = true;
                }

                _healthVignette.color.value = Color.Lerp(
                    Color.black,
                    minHealthColor,
                    ExtensionFunctions.Map(healthRatio, 0, 0.5f, 1, 0.25f)
                    );
            }
            else if (healthRatio > 0.5f && _postProcessOverrideApplied)
            {
                RuntimeUtilities.DestroyVolume(_postProcessVolume, true);
                _postProcessOverrideApplied = false;
            }

            healthFiller.color = healthRatio <= 0.5f
                ? Color.Lerp(minHealthColor, halfHealthColor, healthRatio * 2)
                : Color.Lerp(halfHealthColor, maxHealthColor, (healthRatio - 0.5f) * 2);

            healthSlider.value = healthRatio;
        }
 void OnDisable()
 {
     RuntimeUtilities.DestroyVolume(m_Volume, true, true);
 }
 void OnDestroy()
 {
     RuntimeUtilities.DestroyVolume(_postProcessVolume, true, true);
 }
Beispiel #15
0
 private void OnDestroy()
 {
     StopAllCoroutines();
     RuntimeUtilities.DestroyVolume(rippleVolume, true, true);
 }
Beispiel #16
0
 void OnDestroy()
 {
     RuntimeUtilities.DestroyVolume(m_Volume, true, true);
     On = true;
 }
 private void OnDestroy()
 {
     RuntimeUtilities.DestroyVolume(volume, true, true);
 }
Beispiel #18
0
 void OnDisable()
 {
     profile = null;
     RuntimeUtilities.DestroyVolume(m_Volume, false, true);
     activeModifiers.Remove(this);
 }
Beispiel #19
0
 private void DestroyVolume()
 {
     RuntimeUtilities.DestroyVolume(m_Volume, true, true);
     Iscreate = false;
 }
 public void EndGameOverEffect()
 {
     RuntimeUtilities.DestroyVolume(_volume, false);
 }
Beispiel #21
0
 void OnDestroy()
 {
     RuntimeUtilities.DestroyVolume(v_Volume, true, true);
     RuntimeUtilities.DestroyVolume(ch_Volume, true, true);
 }
 void OnDestroy()
 {
     RuntimeUtilities.DestroyVolume(ppv, true, true);
 }
Beispiel #23
0
    private void OnDisable()
    {
        m_Vignette.SetAllOverridesTo(false);

        RuntimeUtilities.DestroyVolume(m_Volume, true, true);
    }
Beispiel #24
0
 void Destroy()
 {
     RuntimeUtilities.DestroyVolume(m_Volume, true);
 }
Beispiel #25
0
 // -------------------------------------------------------------------------
 // METHOD:     OnDisable
 // DEFINITION: Destroys the post-processing volume we created in Awake()
 // -------------------------------------------------------------------------
 private void OnDisable()
 {
     RuntimeUtilities.DestroyVolume(_ppVolume, true, true);
 }