public void Start()
    {
        if (!bloom)
            bloom = Camera.main.gameObject.GetComponent<MobileBloom> ();
        if (!noise)
            noise = Camera.main.gameObject.GetComponent<ColoredNoise> ();
        if (!fog)
            fog = Camera.main.gameObject.GetComponentInChildren<RenderFogPlane> ();

        current = startMoodBox;
        UpdateFromMoodBox ();
    }
Exemple #2
0
    public void Start()
    {
        if (!bloom)
        {
            bloom = Camera.main.gameObject.GetComponent <MobileBloom> ();
        }
        if (!noise)
        {
            noise = Camera.main.gameObject.GetComponent <ColoredNoise> ();
        }
        if (!fog)
        {
            fog = Camera.main.gameObject.GetComponentInChildren <RenderFogPlane> ();
        }

        current = startMoodBox;
        UpdateFromMoodBox();
    }
    void Start()
    {
        if (heightFogBeforeTransparentGO != null)
        {
            heightFogBeforeTransparentGO.SetActive(true);
        }

        if (!bloom)
        {
            bloom = GetComponent <MobileBloom> ();
        }
        if (!noise)
        {
            noise = GetComponent <ColoredNoise> ();
        }
        if (!depthOfField)
        {
            depthOfField = GetComponent <HeightDepthOfField> ();
        }
        if (!heightFog)
        {
            heightFog = gameObject.GetComponentInChildren <RenderFogPlane> ();
        }
        if (!shaders)
        {
            shaders = GetComponent <ShaderDatabase> ();
        }
        if (!reflection)
        {
            reflection = GetComponent("ReflectionFx") as MonoBehaviour;
        }

        if (autoChoseQualityOnStart)
        {
            AutoDetectQuality();
        }

        ApplyAndSetQuality(currentQuality);
    }
    private void EnableLightning(bool isOn, float fLightningRandom = 10f)
    {
        if (CamerasMgr.MainCameraRoot == null)
        {
            return;
        }
        int lod = 250;

        if (Application.get_platform() == 11)
        {
            lod = 300;
        }
        if (isOn && GameLevelManager.IsPostProcessReachQuality(lod))
        {
            this.m_mobileBloom = CamerasMgr.MainCameraRoot.get_gameObject().AddMissingComponent <MobileBloom>();
            this.m_mobileBloom.set_enabled(true);
            this.m_mobileBloom.m_fLightningRandom = fLightningRandom;
            this.m_mobileBloom.Initialization(MobileBloom.BloomType.Lightning);
        }
        else if (this.m_mobileBloom != null)
        {
            this.m_mobileBloom.set_enabled(false);
        }
    }
    void Start()
    {
        if (heightFogBeforeTransparentGO != null)
            heightFogBeforeTransparentGO.SetActive(true);

        if (!bloom)
            bloom = GetComponent<MobileBloom> ();
        if (!noise)
            noise = GetComponent<ColoredNoise> ();
        if (!depthOfField)
            depthOfField = GetComponent<HeightDepthOfField> ();
        if (!heightFog)
            heightFog = gameObject.GetComponentInChildren<RenderFogPlane> ();
        if (!shaders)
            shaders = GetComponent<ShaderDatabase> ();
        if (!reflection)
            reflection = GetComponent ("ReflectionFx") as MonoBehaviour;

        if (autoChoseQualityOnStart)
            AutoDetectQuality ();

        ApplyAndSetQuality (currentQuality);
    }