コード例 #1
0
 // Use this for initialization
 void Start()
 {
     if (_colorCor == null)
     {
         _colorCor = FindObjectOfType <ColorCorrectionCurves>();
     }
 }
コード例 #2
0
    // Use this for initialization
    void Start()
    {
        vel             = new Vector3();
        rb              = GetComponent <Rigidbody> ();
        controller      = GetComponent <CharacterController> ();
        camera          = GetComponentInChildren <Camera> ();
        colorCorrection = camera.GetComponent <ColorCorrectionCurves> ();
        motionBlur      = camera.GetComponent <MotionBlur> ();
        audioSource     = GetComponent <AudioSource> ();
        if (musicObj != null)
        {
            musicSource = musicObj.GetComponent <AudioSource> ();
        }
        toFloor = new Ray(transform.position, -1 * transform.up);
        Physics.Raycast(toFloor, out hitInfo);
        targetHeight = hitInfo.distance;
        isGhost      = false;
        //NPC = GameObject.FindGameObjectWithTag ("NPC");
        NPCs = GameObject.FindGameObjectsWithTag("NPC");

        testShot = new Ray(new Vector3(-1, 1, -3), Vector3.right);

        curState = state.WALKING;

        playerReticle = playerUI.transform.FindChild("Reticle").GetComponent <Image>();
        if (reverbZone != null)
        {
            reverbZoneSource = reverbZone.GetComponent <AudioReverbZone> ();
        }
    }
コード例 #3
0
    public void Rpc_Respawn()
    {
        ColorCorrectionCurves ColorEfect = playerCamera.GetComponent <ColorCorrectionCurves>();

        dethcam = false;
        GetComponent <MeshRenderer>().enabled = true;
        eyes.SetActive(true);
        ColorEfect.saturation = 1;
        gameObject.layer      = 10;
        if (falling == false)
        {
            health = maxHealth;
        }
        // Set the spawn point to origin as a default value
        Vector3 spawnPoint = Vector3.zero;

        // If there is a spawn point array and the array is not empty, pick one at random
        if (spawnPoints != null && spawnPoints.Length > 0)
        {
            spawnPoint = spawnPoints[Random.Range(0, spawnPoints.Length)].transform.position;
        }
        // Set the player’s position to the chosen spawn point
        transform.position = spawnPoint;
        knockBackVel       = Vector3.zero;
    }
コード例 #4
0
        static ColorCorrectionCurvesDef()
        {
            if (colorCurvesEffect == null)
            {
                colorCurvesEffect = Util.GetComponentVar <ColorCorrectionCurves, ColorCorrectionCurvesDef>(colorCurvesEffect);
            }

            mode        = ColorCorrectionMode.Simple;
            selectiveCc = false;
            saturation  = 1f;

            Keyframe[] keys = new Keyframe[2];
            keys[0] = new Keyframe(0f, 0f, 0f, 1f);
            keys[1] = new Keyframe(1f, 1f, 1f, 0f);

            redChannel   = new AnimationCurve(keys);
            greenChannel = new AnimationCurve(keys);
            blueChannel  = new AnimationCurve(keys);

            depthRedChannel   = new AnimationCurve(keys);
            depthGreenChannel = new AnimationCurve(keys);
            depthBlueChannel  = new AnimationCurve(keys);
            zCurve            = new AnimationCurve(keys);

            selectiveFromColor = Color.white;
            selectiveToColor   = Color.white;

            useDepthCorrection = false;
        }
コード例 #5
0
    void FindComponents()
    {
        ScreenOverlayScript = Camera.main.GetComponent <ScreenOverlay> ();

        // Finds the rigidbody this script is attached to.
        rb = GetComponent <Rigidbody> ();

        // Finds Game Controller script.
        gameControllerScript = GameObject.FindGameObjectWithTag("GameController").GetComponent <GameController> ();

        // Finds Player Mesh Collider (note collider and mesh comonents are two different GameObjects).
        PlayerCollider = GameObject.Find("Collider").GetComponent <MeshCollider>();

        // Finds Player Mesh Renderer
        if (isClone == false)
        {
            PlayerMesh = GameObject.FindGameObjectWithTag("PlayerMesh").GetComponent <MeshRenderer> ();
        }

        // Timescale controller script.
        timeScaleControllerScript = GameObject.FindGameObjectWithTag("TimeScaleController").GetComponent <TimescaleController> ();

        // Finds color correction curves script.
        ColorCorrectionCurvesScript = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <ColorCorrectionCurves>();

        // Finds Camera Shake script.
        if (GameObject.FindGameObjectWithTag("MainCamera").GetComponent <Camera> ().enabled == true && isClone == false)
        {
            camShakeScrpt = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <CameraShake> ();
            LensScript    = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <Lens> ();
        }

        Shafts = GameObject.FindGameObjectWithTag("Shafts");
    }
コード例 #6
0
 void Start()
 {
     hp          = maxHp;
     fader       = GameObject.FindGameObjectWithTag(Tags.fader).GetComponent <FadeInOut>();
     colorCurves = GameObject.FindGameObjectWithTag(Tags.mainCamera).GetComponent <ColorCorrectionCurves>();
     BleedBehavior.BloodAmount = 0;
 }
コード例 #7
0
            static bool Prefix(ColorCorrectionCurves __instance)
            {
                __instance.CheckResources();

                var rgbChannelTex = Traverse.Create(__instance).Field("rgbChannelTex");

                if (CCCCustom == 0 && __instance.redChannel != null && __instance.greenChannel != null && __instance.blueChannel != null)
                {
                    for (float num = 0f; num <= 1f; num += 0.0009775171f)
                    {
                        float num2 = Mathf.Clamp(__instance.redChannel.Evaluate(num), 0f, 1f);
                        float num3 = Mathf.Clamp(__instance.greenChannel.Evaluate(num), 0f, 1f);
                        float num4 = Mathf.Clamp(__instance.blueChannel.Evaluate(num), 0f, 1f);
                        rgbChannelTex.Method("SetPixel", new Type[] { typeof(int), typeof(int), typeof(Color) }).GetValue((int)Mathf.Ceil(num * 1023f), 0, new Color(num2, num2, num2));
                        rgbChannelTex.Method("SetPixel", new Type[] { typeof(int), typeof(int), typeof(Color) }).GetValue((int)Mathf.Ceil(num * 1023f), 1, new Color(num3, num3, num3));
                        rgbChannelTex.Method("SetPixel", new Type[] { typeof(int), typeof(int), typeof(Color) }).GetValue((int)Mathf.Ceil(num * 1023f), 2, new Color(num4, num4, num4));
                    }

                    rgbChannelTex.Method("Apply", new Type[] { typeof(bool) }).GetValue(false);
                    return(false);
                }

                string text = Path.Combine(Application.dataPath, "../UserData/curve/" + CCCName + ".dds");

                Debug.Log("Using custom curve " + text);
                byte[] array = File.ReadAllBytes(text);
                int    num5  = 128;

                byte[] array2 = new byte[array.Length - num5];
                Buffer.BlockCopy(array, num5, array2, 0, array2.Length - num5);
                rgbChannelTex.Method("LoadRawTextureData", new Type[] { typeof(byte[]) }).GetValue(array2);
                rgbChannelTex.Method("Apply", new Type[] { typeof(bool) }).GetValue(false);

                return(false);
            }
コード例 #8
0
            static bool Prefix(ColorCorrectionCurves __instance, ref bool __result)
            {
                var traverse = Traverse.Create(__instance);

                try
                {
                    traverse.Method("CheckSupport", __instance.mode == ColorCorrectionCurves.ColorCorrectionMode.Advanced).GetValue();
                    var CheckShaderAndCreateMaterial = traverse.Method("CheckShaderAndCreateMaterial", new Type[] { typeof(Shader), typeof(Material) });
                    traverse.Field("ccMaterial").SetValue(CheckShaderAndCreateMaterial.GetValue(__instance.simpleColorCorrectionCurvesShader, traverse.Field("ccMaterial").GetValue()));
                    traverse.Field("ccDepthMaterial").SetValue(CheckShaderAndCreateMaterial.GetValue(__instance.colorCorrectionCurvesShader, traverse.Field("ccDepthMaterial").GetValue()));
                    traverse.Field("selectiveCcMaterial").SetValue(CheckShaderAndCreateMaterial.GetValue(__instance.colorCorrectionSelectiveShader, traverse.Field("selectiveCcMaterial").GetValue()));

                    if (traverse.Field("rgbChannelTex").GetValue() == null)
                    {
                        traverse.Field("rgbChannelTex").SetValue(new Texture2D(1024, 4, TextureFormat.RGBAFloat, false, true));
                    }
                    traverse.Field("rgbChannelTex").Property("hideFlags").SetValue(52);
                    traverse.Field("rgbChannelTex").Property("wrapMode").SetValue(1);

                    var isSupported = traverse.Field("isSupported").GetValue <bool>();
                    if (!isSupported)
                    {
                        traverse.Method("ReportAutoDisable").GetValue();
                    }
                    __result = isSupported;
                }
                catch (Exception x)
                {
                    Console.WriteLine(x);
                }

                return(false);
            }
コード例 #9
0
ファイル: ClientCamera.cs プロジェクト: amputek/unity-LAN
    /// <summary>
    /// Hide objects with IR tag, for this client
    /// </summary>
    public void IR(bool irVisible)
    {
        if (!isLocalPlayer)
        {
            return;
        }

        //if client can see IR objects, set these objects active for this client.
        //otherwise, turn em off


        GameObject            cam             = transform.Find("Camera").gameObject;
        ColorCorrectionCurves colorCorrection = cam.GetComponent <ColorCorrectionCurves>();
        BloomOptimized        bloom           = cam.GetComponent <BloomOptimized>();


        //if ir capable, ambient light is FULL, IR objects are VISIBLE, and bloom/desaturation are ACTIVE
        //otherwise, it's night time

        RenderSettings.ambientIntensity    = irVisible ? 1.0f : 0.3f;
        RenderSettings.reflectionIntensity = irVisible ? 0.5f : 0.2f;
        foreach (GameObject obj in GameObject.FindGameObjectsWithTag("IR"))
        {
            obj.SetActive(irVisible);
        }
        bloom.enabled           = irVisible;
        colorCorrection.enabled = irVisible;
    }
コード例 #10
0
    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;
            }
        }
    }
コード例 #11
0
 void Awake()
 {
     m_Bloom     = Camera.main.GetComponent <BloomOptimized>();
     m_Depth     = Camera.main.GetComponent <DepthOfField>();
     m_SSAO      = Camera.main.GetComponent <ScreenSpaceAmbientOcclusion>();
     m_SunShafts = Camera.main.GetComponent <SunShafts>();
     m_CCC       = Camera.main.GetComponent <ColorCorrectionCurves>();
 }
コード例 #12
0
ファイル: ColorCurve.cs プロジェクト: Hsantos/roll-ftw
    // Use this for initialization
    void Start()
    {
        _colorCorrectionCurves = GetComponent <ColorCorrectionCurves> ();

        Messenger.AddListener <float>("ColorCurve.SetValue", SetValue);

        SetValue(Value);
    }
コード例 #13
0
ファイル: EffectManager.cs プロジェクト: theSoenke/GGJ16
    void Awake()
    {
        Instance = this;

        _fisheye = playerCamera.gameObject.GetComponent<Fisheye>();
        _colorSaturation = playerCamera.gameObject.GetComponent<ColorCorrectionCurves>();
        _blur = playerCamera.gameObject.GetComponent<BlurOptimized>();
    }
コード例 #14
0
 // Use this for initialization
 void Start()
 {
     cam_effect            = GetComponent <ColorCorrectionCurves>();
     cam_effect.saturation = 1;
     saturation_value      = cam_effect.saturation;
     original_distance     = player.transform.position.z - destination.transform.position.z;
     original_distance     = Mathf.Abs(original_distance);
 }
コード例 #15
0
    //int loadLevelCount = 0;

    public IEnumerator LoadLeve()
    {
        XkGameCtrl.IsLoadingLevel = true;
        if (GlobalData.GetInstance().gameLeve == GameLeve.Leve1)
        {
            Leve1UITexture.mainTexture = Leve1Texture[0];
            //Leve1UI.spriteName = "diYiGuanHuiSe";
            Leve1.transform.localScale *= 1.00f;
        }
        else
        {
            Leve2UITexture.mainTexture = Leve2Texture[0];
            //Leve2UI.spriteName = "diErGuanHuiSe";
            Leve2.transform.localScale *= 1.00f;
        }

        ColorCorrectionCurves s = (ColorCorrectionCurves)Cam.GetComponent <ColorCorrectionCurves>();

        s.saturation = 1f;

        //System.GC.Collect();

        if (GlobalData.GetInstance().gameMode == GameMode.OnlineMode)
        {
            //ScreenLog.Log("into linkMode game...");
            //NetCtrlScript.handleLoadLevel();

            yield return(new WaitForSeconds(3f));

            if (GlobalData.GetInstance().gameLeve == GameLeve.Leve1)
            {
                status = Application.LoadLevelAsync((int)GameLeve.Leve3);
            }
            else
            {
                status = Application.LoadLevelAsync((int)GameLeve.Leve4);
            }
        }
        else
        {
            yield return(new WaitForSeconds(2f));

            status = Application.LoadLevelAsync((int)GlobalData.GetInstance().gameLeve);
        }
        status.allowSceneActivation = false;
        // Allow new scene to start.
        //ScreenLog.Log("Loading complete"+t+status.isDone);

        Loading.SetActive(true);

        yield return(StartCoroutine("PlayCartoon"));

        //status.allowSceneActivation = true;
        yield return(new WaitForSeconds(3f));

        yield return(status);
    }
コード例 #16
0
ファイル: fps_PlayerHealth.cs プロジェクト: uskw/ShootingGame
    private ColorCorrectionCurves colorCurves; //实现死亡时相机画面逐渐变为黑白效果的脚本(内置资源包)

    void Start()
    {
        hp    = maxHp;//玩家当前生命值为最大值
        fader = GameObject.FindGameObjectWithTag(Tags.fader).GetComponent <FadeInOut>();
        //出现渐隐效果
        colorCurves = GameObject.FindGameObjectWithTag(Tags.mainCamera).GetComponent <ColorCorrectionCurves>();
        //出现黑白效果
        BleedBehavior.BloodAmount = 0;//血红效果为0(在武器相机中设置)
    }
コード例 #17
0
 // Use this for initialization
 void Start()
 {
     playerHand = GetComponent <playerRh1>();
     testlevgen = Component.FindObjectOfType <TestLevelGen>();
     col        = GetComponentInChildren <ColorCorrectionCurves>();
     flashLight = GetComponentInChildren <Light>();
     mo         = GetComponentInChildren <MotionBlur>();
     cam        = Camera.main;
 }
コード例 #18
0
        void Start()
        {
            LastFactor      = Factor;
            LastSaturationA = SaturationA;
            LastSaturationB = SaturationB;

            CurvesScript = GetComponent <ColorCorrectionCurves>();

            PairCurvesKeyframes();
        }
コード例 #19
0
 // Use this for initialization
 void Start()
 {
     focusActive  = false;
     PC           = GameObject.FindGameObjectWithTag("Player").GetComponent <HeroCharacterController>();
     anim         = PC.GetComponent <Animator>();
     doField      = this.transform.GetComponent <DepthOfField>();
     ccCurves     = this.transform.GetComponent <ColorCorrectionCurves>();
     particles    = this.transform.GetComponent <ParticleSystem>();
     maxFocusTime = focusTime;
 }
コード例 #20
0
    private ColorCorrectionCurves colorCorrection;      //this NEEDS standard assets / image effects to work

    // Use this for initialization
    void Start()
    {
        for (int i = 0; i < 16; i++)
        {
            signImages[i] = GameObject.Find("Damage (" + i.ToString() + ")").GetComponent <Image>();
        }

        currentHealth   = myHealth;
        colorCorrection = GetComponentInChildren <ColorCorrectionCurves>();
    }
コード例 #21
0
    public void Rpc_deathcam()
    {
        ColorCorrectionCurves ColorEfect = playerCamera.GetComponent <ColorCorrectionCurves>();

        dethcam = true;
        ColorEfect.saturation = 0;
        StartCoroutine(respawningdeath());
        GetComponent <MeshRenderer>().enabled = false;
        eyes.SetActive(false);
        gameObject.layer = 9;
    }
コード例 #22
0
 // Use this for initialization
 void Start()
 {
     halo = (Behaviour)gameObject.GetComponent("Halo"); //will replace with other visual affects
     blur = Camera.main.GetComponent <Blur>();
     Debug.Log(blur.name);
     vignette        = Camera.main.GetComponent <VignetteAndChromaticAberration>();
     colorcorrection = Camera.main.GetComponent <ColorCorrectionCurves>();
     halo.enabled    = false;
     GUIactive       = false;
     skillsGUI.SetActive(GUIactive);
 }
コード例 #23
0
    // Use this for initialization
    void Start()
    {
        IsShootPlayer = false;
        if (cam1 != null)
        {
            colorCtrl = cam1.GetComponent <ColorCorrectionCurves>();
        }

        cameras  = Camera.allCameras;
        material = Texcure.GetComponent <UITexture> ().material;
        GlobalScript.GetInstance().player.IsPassChange += IsPassChange;
    }
コード例 #24
0
 public override void OnStart()
 {
     base.OnStart();
     _amplifyCache = GameMainReferences.Instance.AmplifyColor;
     _playerEntity = GameMainReferences.Instance.PlayerController.Entity;
     _correctionCurve = GameMainReferences.Instance.RTSCamera.GetComponent<ColorCorrectionCurves>();
     if(LevelMetaInfo.Instance.StartLutTexture != null)
     {
         _amplifyCache.LutTexture = LevelMetaInfo.Instance.StartLutTexture;
         MainLutTexture = LevelMetaInfo.Instance.StartLutTexture;
     }
 }
コード例 #25
0
ファイル: WeatherController.cs プロジェクト: Togene/BeCalm
    // Use this for initialization
    void Start()
    {
        fogDensity = RenderSettings.fogDensity;
        //skydome = GameObject.FindGameObjectWithTag ("SkyDome").GetComponent<Sky> ();
        //skydomeLight = skydome.m_sunIntensity;
        colorCurve = Camera.main.GetComponent<ColorCorrectionCurves> ();
        toneMapper = Camera.main.GetComponent<Tonemapping> ();
        sunShafts = Camera.main.GetComponent<SunShafts> ();

        sunShaftIntens = sunShafts.sunShaftIntensity;
        colorSat = colorCurve.saturation;
        toneExp = toneMapper.exposureAdjustment;
    }
コード例 #26
0
    IEnumerator ResurrectPlayerCR(Seat seat)
    {
        ColorCorrectionCurves ccc = Camera.main.GetComponent <ColorCorrectionCurves>();

        ccc.saturation = 0;
        Time.timeScale = 0.3f;
        ParticleSystem ps = Instantiate(ResurrectionPSPrefab, seat.PlayerAvatar.PortraitImage.transform, false);

        ps.Play();
        yield return(new WaitForSeconds(0.8f));

        ccc.saturation = 0.8f;
        Time.timeScale = 1f;
    }
コード例 #27
0
        public static void InitExtra(ColorCorrectionCurves colorcurves)
        {
            Keyframe[] keys = new Keyframe[2];
            keys[0] = new Keyframe(0f, 0f, 0f, 1f);
            keys[1] = new Keyframe(1f, 1f, 1f, 0f);

            colorcurves.redChannel   = new AnimationCurve(keys);
            colorcurves.greenChannel = new AnimationCurve(keys);
            colorcurves.blueChannel  = new AnimationCurve(keys);

            colorcurves.depthRedChannel   = new AnimationCurve(keys);
            colorcurves.depthGreenChannel = new AnimationCurve(keys);
            colorcurves.depthBlueChannel  = new AnimationCurve(keys);
            colorcurves.zCurve            = new AnimationCurve(keys);
        }
コード例 #28
0
    public IEnumerator ColorCorrection()
    {
        AudioManager.Instance.PlaySFX(BackgroundAudio);
        ColorCorrectionCurves s = (ColorCorrectionCurves)Cam.GetComponent("ColorCorrectionCurves");

        while (s.saturation > 0)
        {
            yield return(0);

            s.saturation -= Time.deltaTime;
        }
        s.saturation = 0;

        StartCoroutine("LoadLeve");
    }
コード例 #29
0
ファイル: ImageSpace.cs プロジェクト: Mcfli/Moai
 public void applyToCamera()
 {
     main_curves = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<ColorCorrectionCurves>();
     /*
     main_curves.redChannel = redChannel;
     main_curves.greenChannel = greenChannel;
     main_curves.blueChannel = blueChannel;
     main_curves.zCurve = zCurve;
     main_curves.depthRedChannel = depthRedChannel;
     main_curves.depthGreenChannel = depthGreenChannel;
     main_curves.depthBlueChannel = depthBlueChannel;
     main_curves.UpdateParameters();
     */
     main_curves.saturation = Mathf.Lerp(main_curves.saturation,saturation,Time.deltaTime*adjust_speed);
 }
コード例 #30
0
    // Use this for initialization
    void Start()
    {
        mainMenuUI = GameObject.FindGameObjectWithTag("MainMenuUI").GetComponent <MainMenuUI>();
        camRot     = GameObject.FindGameObjectWithTag("CameraRotation").GetComponent <CameraRotate>();
        // endGame = GameObject.FindGameObjectWithTag("EndGame").GetComponent<EndGame>();

        originPosition = new Vector2(transform.position.x, transform.position.y);

        camRot.enabled = false;

        playerRotStartTime     = Time.time;
        playerRotJourneyLength = Quaternion.Angle(playerRotStartMarker.rotation, playerRotEndMarker.rotation);

        colourCorrectionCurve = GetComponentInChildren <ColorCorrectionCurves>();
    }
コード例 #31
0
    // Update is called once per frame
    void Update()
    {
        ColorCorrectionCurves c = (ColorCorrectionCurves)gameObject.GetComponent("ColorCorrectionCurves");

        time = Sky.GetComponent <TOD_Sky>().Cycle.Hour;
        if (time >= 12 && time <= 24)
        {
            t = 24 - time;
        }
        if (time >= 0 && time < 12)
        {
            t = time;
        }
        c.selectiveToColor = new Vector4((t / 12), (t / 12), (t / 12), 1);
        //Debug.Log(""+c.selectiveToColor);
    }
コード例 #32
0
ファイル: ImageSpace.cs プロジェクト: Mcfli/Moai
    public void applyToCamera()
    {
        main_curves = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <ColorCorrectionCurves>();

        /*
         * main_curves.redChannel = redChannel;
         * main_curves.greenChannel = greenChannel;
         * main_curves.blueChannel = blueChannel;
         * main_curves.zCurve = zCurve;
         * main_curves.depthRedChannel = depthRedChannel;
         * main_curves.depthGreenChannel = depthGreenChannel;
         * main_curves.depthBlueChannel = depthBlueChannel;
         * main_curves.UpdateParameters();
         */
        main_curves.saturation = Mathf.Lerp(main_curves.saturation, saturation, Time.deltaTime * adjust_speed);
    }
コード例 #33
0
        public virtual void OnLevelCleanUp()
        {
            StopAllCoroutines();

            if (Tilt)
            {
                Tilt.enabled  = false;
                Tilt.blurArea = 0;
                Tilt          = null;
            }

            if (ColorCorrection)
            {
                ColorCorrection.saturation = 1;
                ColorCorrection            = null;
            }

            _isDesaturating = false;
        }
コード例 #34
0
        public virtual void OnLevelLoaded()
        {
            StopAllCoroutines();

            Tilt            = GetComponent <TiltShift>();
            ColorCorrection = GetComponent <ColorCorrectionCurves>();

            if (Tilt)
            {
                Tilt.enabled  = false;
                Tilt.blurArea = 0;
            }

            if (ColorCorrection)
            {
                ColorCorrection.saturation = 1;
            }

            _isDesaturating = false;
        }
コード例 #35
0
ファイル: camera_warp.cs プロジェクト: samsuite/Ritual
	void Start () {
	    ccc = gameObject.GetComponent<ColorCorrectionCurves>();
        cam = gameObject.GetComponent<Camera>();
        len = 60f/BPM;
	}
コード例 #36
0
    // Use this for initialization
    void Start()
    {
        heartRateMonitor = 1f;
        transformedForward = new Vector3();
        finalThrust = new Vector3();
        powerVomitCharged = false;

        initialRotation = transform.rotation;

        bloom = Camera.mainCamera.GetComponent("Bloom") as Bloom;
        noise = Camera.mainCamera.GetComponent("NoiseEffect") as NoiseEffect;
        colour = Camera.mainCamera.GetComponent("ColorCorrectionCurves") as ColorCorrectionCurves;
        particleStartSize = particleStartSize;
        Reset();
    }
コード例 #37
0
	// Use this for initialization
	void Awake () {
        colorCurves = FindObjectOfType<ColorCorrectionCurves>();
        islands = FindObjectsOfType<IslandManager>();
	}
コード例 #38
0
 private void Start()
 {
     PlayerCameraContainer.Current.OnUpdateCamera += UpdateTrackers;
     hudColorCor = PlayerCamera.Current.GetComponent<ColorCorrectionCurves>();
 }
コード例 #39
0
    private void Start()
    {
        _introState = IntroState.Loading;
        _starTime = Time.realtimeSinceStartup;

        _rotSpeed = 10;
        _lastDataCheck = -1;
        _storyPlaneId = 1;

        _webcamTex = new Texture2D(1920, 1080, TextureFormat.RGBA32, false);
        //_webcamTex = new Texture2D(1024, 768, TextureFormat.RGBA32, false);

        Planes.SetActive(false);

        _audioSource = GetComponent<AudioSource>();
        _audioSource.clip = Resources.Load<AudioClip>("Audio/intro2");

        _planeRenderer = Plane.GetComponent<Renderer>();

        StoryPlane.transform.localScale = new Vector3(0.0001f, 0, 0.0001f);
        _tempTargetPos = new Vector3(Random.Range(-0.01f, 0.01f), Random.Range(-0.01f, 0.01f), _planeStartPos.z);

        var nextTex = Resources.Load<Texture2D>("Textures/Story/Story1");
        StoryPlane.GetComponent<Renderer>().material.mainTexture = nextTex;

        _cccScriptLeft = leftCam.GetComponent<ColorCorrectionCurves>();
        _cccScriptRight = rightCam.GetComponent<ColorCorrectionCurves>();

        _grayScriptLeft = leftCam.GetComponent<Grayscale>();
        _grayScriptRight = rightCam.GetComponent<Grayscale>();
        _grayScriptLeft.enabled = false;
        _grayScriptRight.enabled = false;

        _twirlScriptLeft = leftCam.GetComponent<Twirl>();
        _twirlScriptRight = rightCam.GetComponent<Twirl>();
        _twirlScriptLeft.enabled = false;
        _twirlScriptRight.enabled = false;
    }
コード例 #40
0
ファイル: Menu.cs プロジェクト: Egglybert/ProjectKanna
 void Start()
 {
     lasers = this.GetComponent<LineRenderer> ();
     desiredCanvasPos = canvas.localPosition;
     desiredCanvasScale = canvas.localScale;
     treefield = GameObject.Find ("TreeInputField").GetComponent<InputField> ();
     treeslider = GameObject.Find ("trees_slider").GetComponent<Slider> ();
     rockfield = GameObject.Find ("RockInputField").GetComponent<InputField> ();
     rockslider = GameObject.Find ("rocks_slider").GetComponent<Slider> ();
     colorCorrect = GameObject.Find ("Camera").GetComponent<ColorCorrectionCurves> ();
 }
コード例 #41
0
    void FindComponents()
    {
        ScreenOverlayScript = Camera.main.GetComponent<ScreenOverlay> ();

        // Finds the rigidbody this script is attached to.
        rb = GetComponent<Rigidbody> ();

        // Finds Game Controller script.
        gameControllerScript = GameObject.FindGameObjectWithTag ("GameController").GetComponent<GameController> ();

        // Finds Player Mesh Collider (note collider and mesh comonents are two different GameObjects).
        PlayerCollider = GameObject.Find ("Collider").GetComponent<MeshCollider>();

        // Finds Player Mesh Renderer
        if (isClone == false)
        {
            PlayerMesh = GameObject.FindGameObjectWithTag ("PlayerMesh").GetComponent<MeshRenderer> ();
        }

        // Timescale controller script.
        timeScaleControllerScript = GameObject.FindGameObjectWithTag ("TimeScaleController").GetComponent<TimescaleController> ();

        // Finds color correction curves script.
        ColorCorrectionCurvesScript = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<ColorCorrectionCurves>();

        // Finds Camera Shake script.
        if (GameObject.FindGameObjectWithTag ("MainCamera").GetComponent<Camera> ().enabled == true && isClone == false)
        {
            camShakeScrpt = GameObject.FindGameObjectWithTag ("MainCamera").GetComponent<CameraShake> ();
            LensScript = GameObject.FindGameObjectWithTag ("MainCamera").GetComponent<Lens> ();
        }

        Shafts = GameObject.FindGameObjectWithTag ("Shafts");
    }