예제 #1
0
    // Use this for initialization
    void Start()
    {
        // アタッチされてないなら代入する
        if (Vignette == null)
        {
            Vignette = GetComponent <VignetteAndChromaticAberration>();
        }
        if (MotionsBlur == null)
        {
            MotionsBlur = GetComponent <MotionBlur>();
        }

        // けーコンフィグの宣言
        hKeyConfigSettings hk = new hKeyConfigSettings();

        hk.Init();

        // 視差効果がオンになっているか
        //print(hKeyConfigSettings.ParallaxEffect);
        if (false == hKeyConfigSettings.ParallaxEffect)
        {
            GetComponent <VignetteAndChromaticAberration>().enabled = false;
            GetComponent <MotionBlur>().enabled = false;
        }

        if (Player == null)
        {
            Player = GameObject.Find("Player");
        }
    }
예제 #2
0
 // Use this for initialization
 void Start()
 {
     effect       = GetComponentInChildren <VignetteAndChromaticAberration>();
     effect2      = GetComponentInChildren <Tonemapping>();
     minValue     = effect.intensity;
     baseExposure = effect2.exposureAdjustment;
 }
    void OnEnable()
    {
        mainCam = Camera.main;

        if (mainCam != null)
        {
            if (enableChromaticAberration && chromAb == null)
            {
                chromAb = mainCam.gameObject.GetComponent <VignetteAndChromaticAberration>();
                if (chromAb == null)
                {
                    this.enabled = false;
                    Debug.LogWarning("ImageEffectsOnLowHP: No 'Vignette and Chromatic Aberration' component could be found! Disabling script...");
                }
            }
            if (enableColorCorrection && colorCorr == null)
            {
                colorCorr = mainCam.gameObject.GetComponent <ColorCorrectionCurves>();
                if (colorCorr == null)
                {
                    this.enabled = false;
                    Debug.LogWarning("ImageEffectsOnLowHP: No 'Color Correction Curves' component could be found! Disabling script...");
                }
            }
            if (chromAb != null)
            {
                chromAb.enabled = false;
            }
            if (colorCorr != null)
            {
                colorCorr.enabled = false;
            }
        }
    }
    private IEnumerator ContainAnimation(bool b)
    {
        this.NetworkportalPosition = Vector3.zero;
        VignetteAndChromaticAberration vaca = base.GetComponentInChildren <VignetteAndChromaticAberration>();

        this.fpc.m_JumpSpeed   = 0f;
        this.goingViaThePortal = true;
        yield return(new WaitForSeconds(15f));

        float y = base.transform.position.y - 2.5f;

        this.fpc.noclip = true;
        while (base.transform.position.y > y && this.ccm.curClass != 2)
        {
            if (base.transform.position.y - 2f < y)
            {
                vaca.intensity += Time.deltaTime / 2f;
            }
            vaca.intensity           = Mathf.Clamp(vaca.intensity, 0.036f, 1f);
            base.transform.position += Vector3.down * Time.deltaTime / 2f;
            yield return(new WaitForEndOfFrame());
        }
        this.fpc.noclip = false;
        if (b)
        {
            this.Kill();
        }
        this.goingViaThePortal = false;
        yield break;
    }
예제 #5
0
    IEnumerator SwitchLevelAnimation()
    {
        isSwitching = true;
        Image white = transform.Find("white").GetComponent <Image>();

        white.enabled = true;
        white.CrossFadeAlpha(0, 0, true);
        white.CrossFadeAlpha(1, 1, true);

        Transform   controls   = transform.Find("Controls");
        CanvasGroup controlscg = controls.GetComponent <CanvasGroup>();

        AsyncOperation async = SceneManager.LoadSceneAsync(1);

        async.allowSceneActivation = false;

        Camera cam = Camera.allCameras[0];
        VignetteAndChromaticAberration vig = cam.GetComponent <VignetteAndChromaticAberration>();
        float startTime = Time.time;

        while (Time.time - 3f - Time.deltaTime < startTime)
        {
            controlscg.alpha            = Mathf.Lerp(1, 0, curve.Evaluate((Time.time - startTime)));
            vig.intensity               = Mathf.Lerp(0, 0.25f, curve.Evaluate(1 - (Time.time - startTime) / 2.5f));
            cam.transform.eulerAngles   = Vector3.Lerp(new Vector3(10, 20, 0), new Vector3(0, 0, 0), curve.Evaluate(1 - (Time.time - startTime) / 2.5f));
            cam.transform.position      = Vector3.Lerp(new Vector3(0, -12, -2), new Vector3(0, -10, 0), curve.Evaluate(1 - (Time.time - startTime) / 2.5f));
            RenderSettings.ambientLight = Color.Lerp(RenderSettings.ambientLight, Color.white, Time.deltaTime * 5);
            yield return(new WaitForEndOfFrame());
        }
        async.allowSceneActivation = true;
    }
예제 #6
0
 void Awake()
 {
     _camObject     = Camera.main.gameObject;
     _chromAb       = _camObject.GetComponent <VignetteAndChromaticAberration>();
     _noiseAndGrain = _camObject.GetComponent <NoiseAndGrain>();
     audio          = GetComponent <AudioSource>();
 }
예제 #7
0
 void Start()
 {
     tonemapping   = GetComponent <Tonemapping>();
     vignette      = GetComponent <VignetteAndChromaticAberration>();
     noiseAndGrain = GetComponent <NoiseAndGrain>();
     inStealth     = true;
 }
예제 #8
0
 // Use this for initialization
 void Start()
 {
     _health = StartingHealth;
     EventManager.AddListener((int) GameManagerScript.GameEvents.DamagePlayer, OnHit);
     CameraEffects = Camera.main.GetComponent<VignetteAndChromaticAberration>();
     EventManager.AddListener((int) GameManagerScript.GameEvents.LoadlastCheckpoint, OnLoadLastCheckpoint);
 }
예제 #9
0
    void Start()
    {
        cam        = GetComponent <Camera>();
        effects    = GetComponent <VignetteAndChromaticAberration>();
        ppAnimator = GetComponent <PostProcessingAnimator>();
        title      = GameObject.FindWithTag("Title").gameObject.GetComponent <SpriteRenderer>();

        if (target == null)
        {
            //Debug.LogWarning("Camera has no target, gonna try to find an object tagged 'Player'");

            target = GameObject.FindWithTag("Player").GetComponent <PlayerMovement>();

            transform.position = new Vector3(target.transform.position.x, target.transform.position.y, transform.position.z);

            if (target == null)
            {
                Debug.LogError("No object tagged 'Player'");
            }
        }

        if (GameObject.FindGameObjectWithTag("SaveSystem").GetComponent <SaveSystem>().PillarsDestroyed.Count > 0)
        {
            title.enabled = false;

            ppAnimator.FadeIn();

            target.enabled = true;
        }
        else
        {
            target.enabled = false;
            StartCoroutine(TitleScreen());
        }
    }
예제 #10
0
    IEnumerator Start()
    {
        Camera cam = Camera.allCameras[0];
        VignetteAndChromaticAberration vig = cam.GetComponent <VignetteAndChromaticAberration>();

        vig.intensity = 0;

        yield return(new WaitForSeconds(1));

        CaptationDisplay.instance.DisplayText(5, "Welcome testsub...     <b>*cough*</b>     Contestant 55");

        float startTime = Time.time;

        while (Time.time < startTime + 1)
        {
            vig.intensity = Mathf.Lerp(0, 0.25f, Time.time - startTime);
            yield return(new WaitForEndOfFrame());
        }

        yield return(new WaitForSeconds(5));

        CaptationDisplay.instance.DisplayText(5, "This is you.. ofcourse you already know who you are... but anyways");
        Transform target1 = GameObject.Find("PlayerObject").transform;

        startTime = Time.time;
        while (Time.time < startTime + 6)
        {
            target1.position = Vector3.Lerp(target1.position, new Vector3(0.5f, 0, 1.89f), Time.deltaTime * 5);
            yield return(new WaitForEndOfFrame());
        }

        //yield return new WaitForSeconds(7); already waited 7 seconds

        CaptationDisplay.instance.DisplayText(5, "Your objective will be to complete the upcoming tests!");
        Transform target2 = GameObject.Find("StorageCube").transform;
        Transform target3 = GameObject.Find("Turret").transform;

        startTime = Time.time;
        while (Time.time < startTime + 6)
        {
            target1.position = Vector3.Lerp(target1.position, new Vector3(0.5f, 3, 1.89f), Time.deltaTime);
            target2.position = Vector3.Lerp(target2.position, new Vector3(0.5f, 0, 1.89f), Time.deltaTime * 5);
            target3.position = Vector3.Lerp(target3.position, new Vector3(-0.5f, -0.3f, 1.89f), Time.deltaTime * 5);
            yield return(new WaitForEndOfFrame());
        }


        CaptationDisplay.instance.DisplayText(3, "Only then will you be able to 'win' the 60 bucks, good luck!");
        startTime = Time.time;
        while (Time.time < startTime + 5)
        {
            target2.position = Vector3.Lerp(target2.position, new Vector3(0.5f, 3, 1.89f), Time.deltaTime);
            target3.position = Vector3.Lerp(target3.position, new Vector3(-0.5f, 3, 1.89f), Time.deltaTime);
            vig.intensity    = Mathf.Lerp(0.25f, 0, Time.time - startTime);
            yield return(new WaitForEndOfFrame());
        }

        AsyncOperation async = SceneManager.LoadSceneAsync((SceneManager.GetActiveScene().buildIndex + 1) % SceneManager.sceneCountInBuildSettings);
    }
예제 #11
0
 void Start()
 {
     initFov = Camera.main.fieldOfView;
     minFov  = initFov / zoom;
     v       = GetComponent <VignetteAndChromaticAberration>() as VignetteAndChromaticAberration;
     b       = GetComponent <BloomOptimized>();
     player  = FindObjectOfType <HealthManager>();
 }
예제 #12
0
    // Use this for initialization
    void Start()
    {
        VignetteAndChromaticAberration VaCA = GetComponent <VignetteAndChromaticAberration>();

        VaCA.intensity           = .25f;
        VaCA.blur                = 2.5f;
        VaCA.chromaticAberration = 4f;
    }
예제 #13
0
 // Use this for initialization
 void Start()
 {
     rigid     = GetComponent <Rigidbody2D>();
     anim      = GetComponentInChildren <Animator>();
     sprite    = GetComponentInChildren <SpriteRenderer>();
     vACA      = Camera.main.GetComponent <VignetteAndChromaticAberration>();
     vACATimer = 0;
 }
예제 #14
0
 void Start()
 {
     bo           = GetComponent <BloomOptimized>();
     bo.enabled   = false;
     vaca         = GetComponent <VignetteAndChromaticAberration>();
     vaca.enabled = false;
     so           = GetComponent <ScreenOverlay>();
     so.enabled   = false;
 }
예제 #15
0
 void Start()
 {
     bo = GetComponent<BloomOptimized>();
     bo.enabled = false;
     vaca = GetComponent<VignetteAndChromaticAberration>();
     vaca.enabled = false;
     so = GetComponent<ScreenOverlay>();
     so.enabled = false;
 }
예제 #16
0
	void Start () {
			if (camera != null) {
				blurEffect = camera.gameObject.GetComponent<Blur> ();
				noiseEffect = camera.gameObject.GetComponent<NoiseAndGrain> ();
				vignetteEffect = camera.gameObject.GetComponent<VignetteAndChromaticAberration> ();
			}

			DisableVisualEffect ();
	}
예제 #17
0
 private void Start()
 {
     normalFOV    = FPSCamera.fieldOfView;
     aimingFOV    = FPSCamera.fieldOfView - FOVchange;
     vignette     = FPSCamera.GetComponent <VignetteAndChromaticAberration>();
     pauseManager = GameObject.FindGameObjectWithTag("PauseManager").GetComponent <PauseManager>();
     audSource    = GetComponent <AudioSource>();
     player       = GameObject.FindGameObjectWithTag("Player").GetComponent <Player>();
 }
 // Use this for initialization
 void Awake()
 {
     cameraDelta = Vector3.zero;
     controller  = GetComponent <SteamVR_TrackedObject>();
     if (cameraRig != null)
     {
         fovLimiter = cameraRig.GetComponentInChildren <VignetteAndChromaticAberration>();
     }
 }
예제 #19
0
 void Awake()
 {
     vignetteFilter       = gameObject.GetComponent <VignetteAndChromaticAberration>();
     noiseFilter          = gameObject.GetComponent <NoiseAndScratches>();
     blurFilter           = gameObject.GetComponent <CameraMotionBlur>();
     bloomFilter          = gameObject.GetComponent <Bloom>();
     maxVignetteIntensity = lightVignetteIntensity;
     vignetteSpeed        = lightVignetteSpeed;
 }
 protected override void Start()
 {
     base.Start();
     imageEffect         = ImageEffectsManager.current.vignetteAndChromaticAberration;
     mainCharacter       = unit as MainCharacter;
     vignetting          = imageEffect.intensity;
     blurredCorners      = imageEffect.blur;
     chromaticAberration = imageEffect.chromaticAberration;
 }
예제 #21
0
    // Use this for initialization
    void Start () 
    {
        food.value = water.value = health.value = 20;
        food.tick = water.tick = health.tick = 1;
        chromatic_Vignette = Camera.main.GetComponent<VignetteAndChromaticAberration>();
        chromatic_Vignette.enabled = false;
        timer = 0;
        consume = 3;
        ritualButtonAnimation.Play("buttonRitualIddle");
	}
예제 #22
0
 public void Overwrite(VignetteAndChromaticAberration target)
 {
     target.intensity           = intensity;
     target.chromaticAberration = chromaticAberration;
     target.axialAberration     = axialAberration;
     target.blur                = blur;
     target.blurSpread          = blurSpread;
     target.luminanceDependency = luminanceDependency;
     target.blurDistance        = blurDistance;
 }
예제 #23
0
 void Start()
 {
     if (mainCamera == null)
     {
         mainCamera = Camera.main;
     }
     chromTarget        = 0;
     chromSmoothTime    = .2f;
     vignetteController = mainCamera.GetComponent <VignetteAndChromaticAberration>();
 }
예제 #24
0
    void Start()
    {
        if (sliderText == null)
        {
            Debug.LogError("Slider Text missing in script !");
        }

        vignette        = GameObject.Find("Main Camera").GetComponent <VignetteAndChromaticAberration>();
        vignettingStart = vignette.intensity;
    }
예제 #25
0
 private void Copy(VignetteAndChromaticAberration toCopy)
 {
     intensity           = toCopy.intensity;
     chromaticAberration = toCopy.chromaticAberration;
     axialAberration     = toCopy.axialAberration;
     blur                = toCopy.blur;
     blurSpread          = toCopy.blurSpread;
     luminanceDependency = toCopy.luminanceDependency;
     blurDistance        = toCopy.blurDistance;
 }
예제 #26
0
    void Start()
    {
        chroma = GetComponent <VignetteAndChromaticAberration> ();
        bloom  = GetComponent <Bloom> ();

        if (target)
        {
            body = target.GetComponent <Rigidbody2D> ();
        }
    }
예제 #27
0
 public override void OnInit()
 {
     cameraGo     = Camera.main.gameObject;
     cameraAnime  = cameraGo.GetComponent <Animator>();
     followRole   = cameraGo.GetComponent <FollowRole>();
     tiltShift    = cameraGo.GetComponent <TiltShift>();
     vigChrAbe    = cameraGo.GetComponent <VignetteAndChromaticAberration>();
     clrCorLookup = cameraGo.GetComponent <ColorCorrectionLookup>();
     rain         = GameObject.FindGameObjectWithTag("EffectRain");
 }
예제 #28
0
 void Awake()
 {
     triggeredCheck = false;
     vignette = GameObject.Find("Camera").GetComponent<VignetteAndChromaticAberration>();
     startVignetteIntensity = vignette.intensity;
     musicResumed = false;
     crouched = false;
     playersTrans = GameObject.FindGameObjectWithTag("Player").GetComponentInChildren<Camera>().transform;
     totalDuration = encounterDuration;
 }
    void Awake()
    {
        Camera.main.transform.position = CamStartPos.position;
        Camera.main.transform.rotation = CamStartPos.rotation;

        playerGamemanager = GetComponent <PlayerGamemanger>();
        vignette          = Camera.main.GetComponent <VignetteAndChromaticAberration>();

        vignette.intensity = VIGNETTE_START_VAL;
    }
예제 #30
0
 void Start()
 {
     vignette         = Camera.main.GetComponent <VignetteAndChromaticAberration>();
     originalVignette = vignette.intensity;
     originalBlur     = vignette.blur;
     originalDistance = vignette.blurDistance;
     brightness       = Camera.main.GetComponent <Brightness>();
     //DoPause();
     UnPause();
 }
    /*
     *  Initialisation.
     */
    void Start()
    {
        if (DeviceManager._instance)
        {
            //Setup SteamVR Objects:
            headObject                   = DeviceManager._instance.GetHeadsetTransform().gameObject;
            leftControllerObject         = DeviceManager._instance.GetControllerLeftHandObject();
            rightControllerObject        = DeviceManager._instance.GetControllerRightHandObject();
            leftControllerTrackedObject  = leftControllerObject.GetComponent <SteamVR_TrackedObject>();
            rightControllerTrackedObject = rightControllerObject.GetComponent <SteamVR_TrackedObject>();
            leftController               = DeviceManager._instance.GetControllerLeftHand();
            rightController              = DeviceManager._instance.GetControllerRightHand();
            leftControllerIndex          = (int)leftControllerTrackedObject.index;
            rightControllerIndex         = (int)rightControllerTrackedObject.index;

            //Convert button enum to button ID:
            switch (runButton)
            {
            case ControllerButton.Grip:
                runButtonId = EVRButtonId.k_EButton_Grip;
                break;

            case ControllerButton.TouchPad:
                runButtonId = EVRButtonId.k_EButton_SteamVR_Touchpad;
                break;

            case ControllerButton.Trigger:
                runButtonId = EVRButtonId.k_EButton_SteamVR_Trigger;
                break;

            default:
                runButtonId = EVRButtonId.k_EButton_Grip;
                break;
            }

            //Store animation curve incase it gets disabled in the inspector:
            storedSwingCurve = controllerSwingToMovementCurve;

            //Pre-seed controller positions:
            leftControllerLocalPosition          = leftControllerObject.transform.localPosition;
            rightControllerLocalPosition         = rightControllerObject.transform.localPosition;
            leftControllerPreviousLocalPosition  = leftControllerLocalPosition;
            rightControllerPreviousLocalPosition = rightControllerLocalPosition;

            //Get image effect for fov limiting:
            if (fovLimiter == null)
            {
                fovLimiter = DeviceManager._instance.GetHeadsetTransform().gameObject.GetComponentInChildren <VignetteAndChromaticAberration>();
            }
        }
        else
        {
            Debug.LogError("FATAL: DeviceManager instance is not initialised!");
        }
    }
    /* ----------------------------------------
     * At Start, set 'initFov' as the Camera's FOV level, calculate 'minFov'.
     * Also, store the Vignette And Chromatic Aberration image effect attached to the camera in a variable
     */
    void Start()
    {
        // set 'initFov' as the Camera's FOV level
        initFov = Camera.main.fieldOfView;

        // calculate the minimum FOV allowed by dividing the initial FOV by the maximum Zooming alllowed
        minFov = initFov / zoom;

        // create shorthand for the Vignette And Chromatic Aberration image effect attached to the camera
        v = this.GetComponent <VignetteAndChromaticAberration>() as VignetteAndChromaticAberration;
    }
예제 #33
0
    void Start()
    {
        // anim = GetComponent<Animator>();
        rb               = GetComponent <Rigidbody>();
        OldAngle         = 0;
        SprintMeterTimer = 1f;

        cam  = Camera.main;
        fov  = cam.fieldOfView;
        vaca = cam.GetComponent <VignetteAndChromaticAberration>();
    }
    /* ----------------------------------------
     * At Start, set 'initFov' as the Camera's FOV level, calculate 'minFov'.
     * Also, store the Vignette And Chromatic Aberration image effect attached to the camera in a variable
     */
    void Start()
    {
        // set 'initFov' as the Camera's FOV level
        initFov = Camera.main.fieldOfView;

        // calculate the minimum FOV allowed by dividing the initial FOV by the maximum Zooming alllowed
        minFov = initFov / zoom;

        // create shorthand for the Vignette And Chromatic Aberration image effect attached to the camera
        v = this.GetComponent<VignetteAndChromaticAberration>() as VignetteAndChromaticAberration;
    }
예제 #35
0
 // Use this for initialization
 void Start()
 {
     _SSAO = GetComponent <ScreenSpaceAmbientOcclusion> ();
     PlayerPrefs.SetInt("SSAO", 0);
     _CE = GetComponent <ContrastEnhance> ();
     PlayerPrefs.SetInt("CE", 0);
     _Bloom = GetComponent <BloomOptimized> ();
     PlayerPrefs.SetInt("Bloom", 0);
     _Vignette = GetComponent <VignetteAndChromaticAberration> ();
     PlayerPrefs.SetInt("Vignette", 0);
 }
예제 #36
0
    // Use this for initialization
    void Start()
    {
        //oldPos = transform.position;

        fovLimiter = GetComponent <VignetteAndChromaticAberration>();
        if (fovLimiter == null)
        {
            fovLimiter = gameObject.AddComponent <VignetteAndChromaticAberration>(); //create if we dont have it
        }
        //MaxSpeed = GameManager.sSpeedMultiplier * GameManager.kartMovementInfo.maxAcceleration;
    }
예제 #37
0
 // Use this for initialization
 void Start()
 {
     SoundLevelSlider = GameObject.Find("SoundLevelSlider").GetComponent<Slider>();
     MANAGER = GameObject.Find("_Manager").GetComponent<ManagerScript>();
     MainCamera = GameObject.Find("MainCamera");
     GrannyCam = GameObject.Find("GRANNYCAM");
     Noise = MainCamera.GetComponent<NoiseAndScratches>();
     Trippy = MainCamera.GetComponent<VignetteAndChromaticAberration>();
     granny = GameObject.Find("GRANNY");
     door = GameObject.Find("GRANNYDOOR");
     player = GameObject.Find("PLAYER");
     GrannySpot = GameObject.Find("GRANNYSPOT");
 }
예제 #38
0
 void Awake () {
     menuPlayer = GameObject.Find("MenuPlayer");
     highscoreText = GameObject.Find("HighscoreText").GetComponent<Text>();
     StartButton = GameObject.Find("StartGameButton");
     highscoreText.text = "Highscore: " + PlayerPrefs.GetInt("score").ToString();
     cameras = Camera.allCameras;
     foreach (Camera c in cameras)
     {
         if (c.name.Equals("Platform Camera Normal"))
         {
             chromaticAbberationCamera = c.GetComponent<VignetteAndChromaticAberration>();
         }
     }
 }
예제 #39
0
    void Start()
    {
        instance = this;
        trigger = false;

        BlackImg = gameObject.GetComponent<Image>();
        vignette = Camera.main.GetComponent<VignetteAndChromaticAberration>();

        if (vignette != null)
        {
            fade_PlayerDead_Info.Vgnetting_min = vignette.intensity;
            fade_PlayerDead_Info.chromaticAberration_min = vignette.chromaticAberration;
        }

    }
예제 #40
0
    void Start()
    {
        camera = GetComponent<Camera>();
        darkness = GetComponent<VignetteAndChromaticAberration>();
        fisheye = GetComponent<Fisheye>();
        playerCol = player.GetComponent<BoxCollider>();
        playerRig = player.GetComponent<Rigidbody>();
        initialPosition = camera.transform.position;        // Position of camera normally
        playerRigid = player.GetComponent<Rigidbody>();
        playerCollider = player.GetComponent<BoxCollider>();

        // Setting of camera
        camera.fieldOfView = glitchZoom;
        camera.transform.position = new Vector3(cameraInitPoint.position.x, cameraInitPoint.position.y, camera.transform.position.z);
        
        // Adjusting screen
        float targetaspect = 16.0f / 9.0f;
        float windowaspect = (float)Screen.width / (float)Screen.height;
        float scaleheight = windowaspect / targetaspect;
        Rect rect = camera.rect;
        
        if (scaleheight < 1.0f)
        {

            rect.width = 1.0f;
            rect.height = scaleheight;
            rect.x = 0.0f;
            rect.y = (1.0f - scaleheight)/2.0f;

            camera.rect = rect;

            // Adjusting UI
            height = Screen.currentResolution.height;
            pix = camera.pixelHeight;
            newYPosition = ((pix - height) / 2.0f);
            topLeft.anchoredPosition = new Vector2(topLeft.anchoredPosition.x, newYPosition);
            bossLives.anchoredPosition = new Vector2(bossLives.anchoredPosition.x, newYPosition);
        }
        
    }
예제 #41
0
    void Start()
    {
        motionBlur = Camera.main.GetComponent<MotionBlur>();
        twirl = Camera.main.GetComponent<Twirl>();
        fisheye = Camera.main.GetComponent<Fisheye>();
        vignette = Camera.main.GetComponent<VignetteAndChromaticAberration>();
        noise = Camera.main.GetComponent<NoiseAndGrain>();

        motionBlur.enabled = false;
        twirl.enabled = false;
        fisheye.enabled = false;
        vignette.enabled = false;
        noise.enabled = false;
    }
예제 #42
0
    void Start()
    {
        // anim = GetComponent<Animator>();
        rb = GetComponent<Rigidbody>();
        OldAngle = 0;
        SprintMeterTimer = 1f;

        cam = Camera.main;
        fov = cam.fieldOfView;
        vaca = cam.GetComponent<VignetteAndChromaticAberration>();
    }
예제 #43
0
 void Start()
 {
     vignette = Camera.main.GetComponent<VignetteAndChromaticAberration>();
     originalVignette = vignette.intensity;
     originalBlur = vignette.blur;
     originalDistance = vignette.blurDistance;
     brightness = Camera.main.GetComponent<Brightness>();
     DoPause();
 }
예제 #44
0
 protected override void Awake()
 {
     base.Awake();
     _vignetting = GetComponent<VignetteAndChromaticAberration>();
 }
예제 #45
0
	// Use this for initialization
	void Start () {
        tw = GetComponent<Twirl>();
        g = GetComponent<Grayscale>();
        v = GetComponent<VignetteAndChromaticAberration>();
        Search();
	}
예제 #46
0
    void Start( )
    {
        //Assign camera effect vars
        CameraVignette = GetComponent<VignetteAndChromaticAberration>( );
        CameraBloom = GetComponent<BloomOptimized>( );
        CameraDoF = GetComponent<DepthOfField>( );

        CameraPos = new Vector3( );

        //Debug
        SetCameraMode( CameraMode.GAME );
    }
예제 #47
0
    void Start()
    {
        currentSlide = slide.nullstate;
        theCanvas = GameObject.Find ("Canvas");
        cmaera = GameObject.Find ("Main Camera");
        cmaeraTr = cmaera.transform;

        umbrella = GameObject.Find ("Umbrella_Presentation");
        umbrellaTr = umbrella.transform;
        umbrellaAnim = umbrella.GetComponent<Animator> ();
        npcTR = GameObject.Find ("NPC").transform;
        npcAnim = GameObject.Find ("NPC").GetComponent<Animator> ();
        npcHands = GameObject.Find ("Hands").GetComponent<Animator> ();
        kittenAnim = GameObject.Find ("kitten 1").GetComponent<Animator> ();
        kittentr = GameObject.Find ("kitten 1").transform;
        blurring = cmaera.GetComponent<VignetteAndChromaticAberration> ();
    }
예제 #48
0
	public void Initialize()
	{
		Party = new PlayerParty(this);
		Party.Initialize();
		TimedAction = new PlayerTimedAction(this);

		_vignette = Camera.main.GetComponent<VignetteAndChromaticAberration>();

		IsHoldToAim = true;

		_numberOfRocks = 10;

		InputEventHandler.OnCameraSwitchMode += SwitchCameraMode;

		InputEventHandler.OnPlayerMove += this.OnPlayerMove;
		InputEventHandler.OnPlayerStopMove += this.OnPlayerStopMove;
		InputEventHandler.OnWeaponPullTrigger += this.OnWeaponPullTrigger;
		InputEventHandler.OnWeaponReleaseTrigger += this.OnWeaponReleaseTrigger;
		InputEventHandler.OnRMBDown += this.OnRMBDown;
		InputEventHandler.OnRMBUp += this.OnRMBUp;
		InputEventHandler.OnLRMBDown += this.OnLRMBDown;
		InputEventHandler.OnKick += this.OnKick;

		InputEventHandler.OnPlayerMoveLeft += this.OnPlayerMoveLeft;
		InputEventHandler.OnPlayerMoveRight += this.OnPlayerMoveRight;
		InputEventHandler.OnPlayerMoveUp += this.OnPlayerMoveUp;
		InputEventHandler.OnPlayerMoveDown += this.OnPlayerMoveDown;
		InputEventHandler.OnPlayerStopMoveLeft += this.OnPlayerStopMoveLeft;
		InputEventHandler.OnPlayerStopMoveRight += this.OnPlayerStopMoveRight;
		InputEventHandler.OnPlayerStopMoveUp += this.OnPlayerStopMoveUp;
		InputEventHandler.OnPlayerStopMoveDown += this.OnPlayerStopMoveDown;

		InputEventHandler.OnPlayerStartSprint += this.OnPlayerStartSprint;
		InputEventHandler.OnPlayerStopSprint += this.OnPlayerStopSprint;

		InputEventHandler.OnPlayerToggleSneak += OnToggleSneaking;
		InputEventHandler.OnPlayerThrow += OnThrow;

		InputEventHandler.OnPlayerSwitchWeapon2 += OnToggleWeapon2;
		InputEventHandler.OnPlayerSwitchWeapon1 += OnToggleWeapon1;
		InputEventHandler.OnPlayerSwitchThrown += OnToggleThrown;
		InputEventHandler.OnPlayerSwitchTool += OnToggleTool;

		InputEventHandler.OnPlayerReload += OnWeaponReload;
		InputEventHandler.OnToggleFlashlight += OnToggleFlashlight;

		InputEventHandler.OnGameTogglePause += ToggleGamePause;
		InputEventHandler.OnSelectMember1 += OnSelectMember1;
		InputEventHandler.OnSelectMember2 += OnSelectMember2;
		InputEventHandler.OnSelectMember3 += OnSelectMember3;
		InputEventHandler.OnSelectMember4 += OnSelectMember4;
		InputEventHandler.OnMouseSelect += OnPlayerMouseSelect;

		InputEventHandler.OnClearTask += OnClearTask;

		_moveDirection = PlayerMoveDirEnum.Stop;
		_moveDirection2 = PlayerMoveDirEnum.Stop;

		SelectedPC.CurrentStance = HumanStances.Run;

		_playerLight = GameObject.Find("PlayerLight").GetComponent<Light>();
		_playerLight.intensity = 0.1f;
	}
예제 #49
0
    // Use this for initialization
    void Start()
    {
        foreach (GameObject go in  UnityEngine.Object.FindObjectsOfType<GameObject>()) {
            if ((go.layer == LayerMask.NameToLayer("Hidden KeyObjects") || go.layer == LayerMask.NameToLayer("Hidden Geometry"))) {
                MeshRenderer meshrenderer = go.GetComponent<MeshRenderer>();
                if (meshrenderer != null) meshrenderer.enabled = false;
            }

            foreach (Transform t in go.transform) {
                if ((t.gameObject.layer != LayerMask.NameToLayer("Hidden KeyObjects") && t.gameObject.layer != LayerMask.NameToLayer("Hidden Geometry"))) continue;
                List<MeshRenderer> renderers = new List<MeshRenderer>();
                renderers.AddRange(t.GetComponentsInChildren<MeshRenderer>());
                foreach (MeshRenderer m in renderers) {
                    m.enabled = false;
                }
            }
        }
        vignet = GetComponent<VignetteAndChromaticAberration>();
        grayscale = GetComponent<Grayscale>();

        playerController = GameObject.FindWithTag("Player").GetComponent<TwinStickController>();
        if (!Application.isEditor) {
            Cursor.lockState = CursorLockMode.Confined;
            Cursor.visible = false;
        }
    }