Example #1
0
    void Awake()
    {
        if (instance == null)
        {
            instance = this;
        }

        fpsController       = gameObject.GetComponentInParent <FirstPersonController>();
        characterController = gameObject.GetComponentInParent <CharacterController>();
        analogGlitch        = gameObject.GetComponent <AnalogGlitch>();
        digitalGlitch       = gameObject.GetComponent <DigitalGlitch>();
        tiltShift           = gameObject.GetComponent <TiltShift>();
        noiseAndGrain       = gameObject.GetComponent <NoiseAndGrain>();
        bloomAndFlares      = gameObject.GetComponent <BloomAndFlares>();
        ramp = gameObject.GetComponents <Ramp>()[1];
        puffOfSmokeDetonator = puffOfSmoke.GetComponent <Detonator>();
        cameraShake          = gameObject.GetComponent <CameraShake>();
        hudPowerText         = hudPowerTextGroup.GetComponent <ShakyText>();

        //Initialization
        digitalGlitch.intensity      = .2f;
        analogGlitch.scanLineJitter  = .414f;
        analogGlitch.verticalJump    = .02f;
        analogGlitch.horizontalShake = .011f;
        analogGlitch.colorDrift      = .11f;

        powerPercent = powerStartPercent;
    }
    // Use this for initialization
    void Start()
    {
        //Heart Spell
        HeartParticles.SetActive(false);

        //Smoke Spell
        //smoke.SetActive(false);

        //Light Spell
        selfLight.SetActive(false);

        //flash spell Effect 1 setup
        flash1stEffect.SetActive(false);
        flash1stEffectTimer = 1;
        //flash spell Effect 2 setup
        BandF = fpCamera.GetComponent <BloomAndFlares>();
        BandF.bloomIntensity = 0;

        //drunk setup
        drunkTimer = 3;
        fpCamera.GetComponent <MotionBlur>().enabled = false;

        //Psy Spell
        psyLimit = 5;

        isScreaming = false;

        endingAble = false;

        Cursor.visible   = false;
        Cursor.lockState = CursorLockMode.Locked;
    }
Example #3
0
    private void Start()
    {
        BloomAndFlares component = GetComponent <BloomAndFlares>();

        if (null != component)
        {
            component.enabled = (QualitySettings.GetQualityLevel() >= 3);
        }
    }
        private void LevelFinishedLoading(Scene scene, LoadSceneMode mode)
        {
            if (Camera.main != null)
            {
                _amplifyComponent = Camera.main.gameObject.GetComponent <AmplifyColorEffect>();
                _bloomComponent   = Camera.main.gameObject.GetComponent <BloomAndFlares>();

                SetEffects(SaturationEnabled.Value, BloomStrength.Value);
            }
        }
Example #5
0
    private void Start()
    {
        ghostFrom         = (ghostTo = base.transform.rotation);
        scopeCameraFactor = 1f;
        cameraSpeedFactor = PlayerPrefs.GetFloat("CameraSpeedFactor", 1f);
        me                    = base.transform.parent;
        eyePosition           = new Vector3(0f, 1.55f, 0f);
        eyePositionOnSquatted = new Vector3(0f, 1.1f, 0f);
        cannon                = null;
        cannonTryingTime      = 0f;
        Camera[] componentsInChildren = GetComponentsInChildren <Camera>();
        for (int i = 0; i < componentsInChildren.Length; i++)
        {
            if (componentsInChildren[i].name == "First Person Camera")
            {
                fpCam = componentsInChildren[i];
            }
        }
        Vector3 eulerAngles = base.transform.eulerAngles;

        x                = eulerAngles.y;
        y                = eulerAngles.x;
        alive            = true;
        recoilYaw        = 0f;
        recoilPitch      = 0f;
        sumOfRecoilYaw   = 0f;
        sumOfRecoilPitch = 0f;
        if (QualitySettings.GetQualityLevel() < 3)
        {
            BloomAndFlares component = GetComponent <BloomAndFlares>();
            if (null != component)
            {
                Object.Destroy(component);
            }
        }
    }
Example #6
0
 // Use this for initialization
 void Start()
 {
     player = GameObject.Find("Player");
     effect = Camera.main.GetComponent <BloomAndFlares>();
 }
    // Use this for initialization
    void Start()
    {

        //Heart Spell
        HeartParticles.SetActive(false);

        //Smoke Spell
        //smoke.SetActive(false);

        //Light Spell
        selfLight.SetActive(false);

        //flash spell Effect 1 setup
        flash1stEffect.SetActive(false);
        flash1stEffectTimer = 1;
        //flash spell Effect 2 setup
        BandF = fpCamera.GetComponent<BloomAndFlares>();
        BandF.bloomIntensity = 0;

        //drunkMathew setup
        drunkTimer = 3;
        fpCamera.GetComponent<MotionBlur>().enabled = false;

        //Psy Spell
        psyLimit = 5;

    }
Example #8
0
    private void UpdatePostProcess()
    {
        foreach (Camera cam in Camera.allCameras)
        {
            SMAA                   defAntiAlias = cam.GetComponent <SMAA>();
            Bloom                  b            = cam.GetComponent <Bloom>();
            BloomAndFlares         baf          = cam.GetComponent <BloomAndFlares>();
            ContrastEnhance        ce           = cam.GetComponent <ContrastEnhance>();
            MotionBlur             mb           = cam.GetComponent <MotionBlur>();
            WeaponDepthOfField     wdof         = cam.GetComponent <WeaponDepthOfField>();
            SunShafts              ss           = cam.GetComponent <SunShafts>();
            AmplifyOcclusionEffect ao           = cam.GetComponent <AmplifyOcclusionEffect>();
            ColorCorrection        ccc          = cam.GetComponent <ColorCorrection>();

            if (defAntiAlias)
            {
                defAntiAlias.enabled = (antiAliasing == 1);
            }

            if (wdof)
            {
                wdof.enabled = (wDepthOfField == 1);
            }

            bool bloomBool = (bloom == 1);
            if (baf)
            {
                baf.enabled = bloomBool;
            }
            if (b)
            {
                b.enabled = bloomBool;
            }

            if (ss)
            {
                ss.enabled = (sunShafts == 1);
            }
            if (mb)
            {
                mb.enabled = (motionBlur == 1);
            }

            bool ssaoBool = (SSAO == 1);
            if (ao)
            {
                ao.enabled = ssaoBool;
            }

            bool ccBool = (colorCorrection == 1);
            if (ccc)
            {
                ccc.enabled = ccBool;
            }
            if (ce)
            {
                ce.enabled = ccBool;
            }
        }

        lastPP      = Time.unscaledTime;
        cameraCount = Camera.allCameras.Length;
    }
Example #9
0
    void InitialiseValues()
    {
        //if (EventManager.inst.currentLevel == "City Outskirts")
        //{
        //    whiteBackDrop = GameObject.Find("WhiteBackDrop").GetComponent<Image>();
        //}

        EventManager.inst.memoryLookScalar = 1;
        EventManager.inst.memoryMoveScalar = 1;

        fadeToBlack = GameObject.Find("FadeToBlack").GetComponent<RawImage>();

        waterObjs = GameObject.FindGameObjectsWithTag("Water");

        if (waterObjs != null)
        {
            water = new Water[waterObjs.Length];
            for (int i = 0; i < waterObjs.Length; i++)
            {
                water[i] = waterObjs[i].GetComponent<Water>();
            }
        }

        if (EventManager.inst.currentLevel == "Coast")
        {
            dyingSFX = GameObject.Find("DyingSFX").GetComponent<AudioSource>();
        }

        subUI1 = GameObject.Find("Subtitles1").GetComponent<Text>();
        subUI2 = GameObject.Find("Subtitles2").GetComponent<Text>();
        dialogueAudio = GameObject.Find("MemoryDialogue").GetComponent<AudioSource>();
        bgmSource = GameObject.Find("BackGroundMusicSource").GetComponent<AudioSource>();
        breathingSource = GameObject.Find("BreathingSFX").GetComponent<AudioSource>();
        sceneLighting = GameObject.Find("Directional Light").GetComponent<Light>();
        skySphere = GameObject.Find("skySphere");
        memoryFlashObj = GameObject.Find("MemoryFlashObj").GetComponent<Image>();

        if (EventManager.inst.currentLevel == "Coast")
        {
            endMusic = GameObject.Find("CreditsMusic").GetComponent<AudioSource>();
        }

        gameCam = GameObject.Find("Camera").GetComponent<Camera>();
        bloom = gameObject.GetComponent<BloomAndFlares>();
        fog = gameObject.GetComponent<GlobalFog>();
        whiteVignette = GameObject.Find("WhiteVignette");

        if (whiteVignette != null)
        {
            whiteVignette.SetActive(false);
        }
        ambienceAudio = GameObject.Find("Ambience").GetComponent<AudioSource>();
        ambienceAudioMaxVol = ambienceAudio.volume;
        bgmMaxVolume = bgmSource.volume;
        breathingMaxVolume = breathingSource.volume;
        dialogueVolume = dialogueAudio.volume;
        startBloom = bloom.bloomIntensity;
        startFog = fog.heightDensity;
        skipLerp = 5;

        if (exhaustionAudio != null)
        {
            exhaustionMaxVol = exhaustionAudio.gameObject.GetComponent<Exhaustion>().maxVol;
        }
    }
Example #10
0
 // Use this for initialization
 void Start()
 {
     cameraShakeFlag = false;
     blur            = Camera.main.GetComponent <MotionBlur>();
     bF = Camera.main.GetComponent <BloomAndFlares>();
 }
Example #11
0
 void Start()
 {
     bloom = GetComponent <BloomAndFlares> ();
 }