Наследование: PostEffectsBase
    /// <summary>
    /// 设置摄像机效果时间
    /// </summary>
    private void SetCameraEffectTime(int iTag)
    {
        if (m_CameraEffectTimeList == null)
        {
            return;
        }
        if (MobileHardwareInfo.Instance.HardwareLevel != Games.GlobeDefine.GameDefine_Globe.HardwardLevel.LEVEL_HIGH)
        {
            return;
        }

        if (m_CameraEffectTimeList.ContainsKey(iTag))
        {
            CameraEffectTime effectTime = m_CameraEffectTimeList[iTag];
            m_BlurBeginTime = effectTime.BeginTime;
            m_BlurEndTime   = effectTime.EndTime;
        }
        else
        {
            m_BlurBeginTime = m_BlurEndTime = 0.0f;
        }

        if (ScCameraGameObjects.Length > iTag)
        {
            if (ScCameraGameObjects[iTag] != null)
            {
                m_CurMotionBlur = ScCameraGameObjects[iTag].GetComponent <MotionBlur>();
            }
        }
    }
Пример #2
0
 // Update is called once per frame
 void Update()
 {
     visionBlur            = GameObject.Find("Main Camera").GetComponent <MotionBlur>();
     visionBlur.blurAmount = 0.01f * player.currentSanity;
     sanityView            = new Color(1, 0, 0, 0.01f * player.currentSanity);
     GameObject.Find("SanityCanvas").transform.GetChild(0).GetComponent <Image> ().color = sanityView;
 }
    public int GrayscaleRange = 0;   //Targeted reset for Grayscaling (-100 Gray, 0 Normal, 100 Super Saturated)

    void Start()
    {
        #region Vignette Init
        Vig = ScriptableObject.CreateInstance <Vignette>();
        Vig.enabled.Override(true);
        Vig.intensity.Override(.45f);
        #endregion

        #region ColorGrading Init
        ColorG = ScriptableObject.CreateInstance <ColorGrading>();
        ColorG.enabled.Override(true);
        if (GrayScale)
        {
            ColorG.saturation.Override(-100f);
        }
        ColorG.postExposure.overrideState = true;
        #endregion

        #region DepthOfField Init
        DOF = ScriptableObject.CreateInstance <DepthOfField>();
        DOF.enabled.Override(true);
        DOF.focusDistance.Override(5f);
        #endregion

        #region MotionBlur Init
        Blur = ScriptableObject.CreateInstance <MotionBlur>();
        Blur.enabled.Override(true);
        #endregion

        #region Volume Init
        Volume = PostProcessManager.instance.QuickVolume(gameObject.layer, 100f, Vig, ColorG, DOF, Blur);
        #endregion
    }
Пример #4
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");
        }
    }
Пример #5
0
	void Start () {
		offset = transform.position;
		_grayscaleComponent = GetComponent<Grayscale>();
		_blurComponent = GetComponent<MotionBlur> ();
		_blurComponent.enabled = false;
		_grayscaleComponent.enabled = true;
	}
Пример #6
0
 // Use this for initialization
 void Start()
 {
     motionBlurFilter    = Camera.main.GetComponent <MotionBlur>();
     fisheye             = Camera.main.GetComponent <Fisheye>();
     depthOfField        = Camera.main.GetComponent <DepthOfField>();
     spaceshipController = GetComponent <SpaceshipController>();
 }
    // 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> ();
        }
    }
Пример #8
0
 void Awake()
 {
     audioSource    = GetComponent <AudioSource>();
     gameController = GameObject.FindGameObjectWithTag("GameController").GetComponent <GameController>();
     grayscale      = GetComponentInChildren <Grayscale>(true);
     motionblur     = GetComponentInChildren <MotionBlur>(true);
 }
Пример #9
0
 // Use this for initialization
 void Start()
 {
     distanceExorcist = 1000f;
     //Debug.Log(distanceExorcist);
     timerOn      = false;
     motionScript = playerCam.GetComponent <MotionBlur>();
 }
Пример #10
0
    IEnumerator OnNewGame()
    {
        yield return(new WaitForSeconds(3));

        AudioReverbFilter arf = GetComponent <AudioReverbFilter> ();

        if (arf)
        {
            arf.enabled = true;
        }

        MotionBlur mb = GetComponent <MotionBlur> ();

        if (mb)
        {
            mb.enabled = true;
        }

        for (float t = 0; t <= 4; t += Time.deltaTime)
        {
            // Gradually strengthen reverb filter.
            if (arf)
            {
                arf.decayTime = Mathf.Lerp(0, 20, t / 4);
            }

            yield return(null);
        }
    }
Пример #11
0
    private void Awake()
    {
        if (Instance == null)
        {
            Instance = this;
        }
        //init
        if (cameraShake.camera)
        {
            mainCamera = cameraShake.camera;
        }
        else
        {
            mainCamera = GetComponentInChildren <CinemachineVirtualCamera>();
        }
        noise = mainCamera.GetCinemachineComponent <CinemachineBasicMultiChannelPerlin>();

        radialBlurIsOpen   = false;
        motionVectorIsOpen = false;

        PPP = GetComponent <PostProcessVolume>().sharedProfile;
        motionBlurSetting = PPP.GetSetting <MotionBlur>();
        RadialBlurSetting = PPP.GetSetting <RadialBlur>();
        HitEffectSetting  = PPP.GetSetting <Vignette>();
    }
 protected override void Awake()
 {
     if (!postProcessingProfile.TryGet <MotionBlur>(out mb))            //Try to get the setting override
     {
         mb = postProcessingProfile.Add <MotionBlur>(true);             //Create one if it can't be found
     }
     base.Awake();
 }
Пример #13
0
    private void AddCameraMotionBlur()
    {
        MotionBlur mb = uiCamera.gameObject.AddComponent <MotionBlur>();

        mb.motionBlurShader = Shader.Find("Custom/Motion Blur");
        mb.blurAmount       = 0.9f;
        EventManager.Instance.Send(new BlurSwitchEvent("close"));
    }
Пример #14
0
 void Start()
 {
     //mBlur = Camera.main.gameObject.GetComponent<MotionBlur> ();
     //sManager = Camera.main.gameObject.GetComponent<Scare_Manager> ();
     mBlur         = GameObject.FindWithTag("MainCamera").GetComponent <MotionBlur> ();
     sManager      = GameObject.FindWithTag("MainCamera").GetComponent <Scare_Manager> ();
     mBlur.enabled = false;
 }
Пример #15
0
 private static void LoadDefaults()
 {
     resolution = Screen.currentResolution;
     fullscreen = Screen.fullScreen;
     antialiasing = Antialiasing.Ultra;
     shadows = Shadows.High;
     bloom = Bloom.High;
     motionBlur = MotionBlur.High;
 }
Пример #16
0
 void Start()
 {
     motionBlur            = GameOver.MotionBlur;
     MB                    = PPP.GetSetting <MotionBlur>();
     MB.shutterAngle.value = motionBlur;
     PPP.GetSetting <MotionBlur>().shutterAngle = MB.shutterAngle;
     mouseSpeed       = GameOver.MouseSens;
     Cursor.lockState = CursorLockMode.Locked;
 }
Пример #17
0
    // Use this for initialization
    void Start()
    {
        m_tiltMin = -m_tiltMin;
        m_panMin  = -m_panMin;

        m_startTilt = transform.rotation.eulerAngles.x;
        m_startPan  = transform.rotation.eulerAngles.y;

        if (m_player == null)
        {
            m_player = GameObject.FindGameObjectWithTag("Player");
            if (m_player == null)
            {
                Debug.Log("m_player not found!");
            }
            else
            {
                m_playerRB = m_player.GetComponent <Rigidbody>();
                if (m_playerRB == null)
                {
                    Debug.Log("m_playerRB not found!");
                }

                m_playerController = m_player.GetComponent <PlayerController>();
                if (m_playerController == null)
                {
                    Debug.Log("m_playerController not found!");
                }
            }
        }
        else
        {
            m_playerRB = m_player.GetComponent <Rigidbody>();
            if (m_playerRB == null)
            {
                Debug.Log("m_playerRB not found!");
            }

            m_playerController = m_player.GetComponent <PlayerController>();
            if (m_playerController == null)
            {
                Debug.Log("m_playerController not found!");
            }
        }

        m_motionBlur = GetComponentInChildren <MotionBlur>();
        if (m_motionBlur == null)
        {
            Debug.Log("m_motionBlur not found!");
        }

        m_radialBlur = GetComponent <CameraSpeedBlur>();
        if (m_radialBlur == null)
        {
            Debug.Log("m_radialBlur not found!");
        }
    }
 // 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;
 }
Пример #19
0
 void Start()
 {
     cam = GetComponentInChildren<Camera>();
     
     blur = GetComponentInChildren<MotionBlur>();
     Vector3 angles = transform.eulerAngles;
     x = angles.y;
     y = angles.x;
 }
Пример #20
0
    void Start()
    {
        m_Blur = ScriptableObject.CreateInstance <MotionBlur>();
        m_Blur.enabled.Override(true);
        m_Blur.shutterAngle.Override(300);
        m_Blur.sampleCount.Override(10);

        m_Volume = PostProcessManager.instance.QuickVolume(gameObject.layer, 100f, m_Blur);
    }
Пример #21
0
 void OnCollisionEnter(Collision other)
 {
     if (other.gameObject.tag == "HurtsPlayer") {
       noise = Camera.main.GetComponent<NoiseAndGrain>() as NoiseAndGrain;
       vignetting = Camera.main.GetComponent<Vignetting>() as Vignetting;
       lowPass = Camera.main.GetComponent<AudioLowPassFilter>() as AudioLowPassFilter;
       motionBlur = Camera.main.GetComponent<MotionBlur>() as MotionBlur;
       timer = effectDuration;
     }
 }
 // Use this for initialization
 void Start()
 {
     if (!networkView.isMine)
     {
         enabled = false;
         return;
     }
     mb = Camera.main.GetComponent <MotionBlur>();
     df = Camera.main.GetComponent <DepthOfField34>();
 }
Пример #23
0
        private void MotionBlurToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var bm = new Bitmap(pictureBox1.Image);

            old_image = image;
            image     = bm;
            Filters filter = new MotionBlur(5);

            backgroundWorker1.RunWorkerAsync(filter);
        }
Пример #24
0
    void Start()
    {
        cam = GetComponentInChildren <Camera>();

        blur = GetComponentInChildren <MotionBlur>();
        Vector3 angles = transform.eulerAngles;

        x = angles.y;
        y = angles.x;
    }
Пример #25
0
    // Use this for initialization
    void Start()
    {
        //obtengo el efecto de la camara
        blur = Camera.main.GetComponent <MotionBlur>();

        //cantidad de blur, valores entre 0 y 1
        blur.blurAmount = 0;

        instance = this;
    }
        static MotionBlurDef()
        {
            if (motionBlurEffect == null)
            {
                motionBlurEffect = Util.GetComponentVar <MotionBlur, MotionBlurDef>(motionBlurEffect);
            }

            extraBlur  = false;
            blurAmount = 0.8f;
        }
        internal void InitializeProfiles()
        {
            if (!SettingValues.profile.TryGetSettings(out chromaticAberrationLayer))
            {
                chromaticAberrationLayer = SettingValues.profile.AddSettings <ChromaticAberration>();
            }

            if (!SettingValues.profile.TryGetSettings(out grainLayer))
            {
                grainLayer = SettingValues.profile.AddSettings <Grain>();
            }

            if (!SettingValues.profile.TryGetSettings(out ambientOcclusionLayer))
            {
                ambientOcclusionLayer = SettingValues.profile.AddSettings <AmbientOcclusion>();
            }

            if (!SettingValues.profile.TryGetSettings(out autoExposureLayer))
            {
                autoExposureLayer = SettingValues.profile.AddSettings <AutoExposure>();
            }

            if (!SettingValues.profile.TryGetSettings(out bloomLayer))
            {
                bloomLayer = SettingValues.profile.AddSettings <Bloom>();
            }

            if (!SettingValues.profile.TryGetSettings(out colorGradingLayer))
            {
                colorGradingLayer = SettingValues.profile.AddSettings <ColorGrading>();
            }

            if (!SettingValues.profile.TryGetSettings(out depthOfFieldLayer))
            {
                depthOfFieldLayer = SettingValues.profile.AddSettings <DepthOfField>();
            }

            if (!SettingValues.profile.TryGetSettings(out screenSpaceReflectionsLayer))
            {
                screenSpaceReflectionsLayer = SettingValues.profile.AddSettings <ScreenSpaceReflections>();
            }

            if (!SettingValues.profile.TryGetSettings(out vignetteLayer))
            {
                vignetteLayer = SettingValues.profile.AddSettings <Vignette>();
            }

            if (!SettingValues.profile.TryGetSettings(out motionBlurLayer))
            {
                motionBlurLayer = SettingValues.profile.AddSettings <MotionBlur>();
                motionBlurLayer.enabled.value = false;
            }

            depthOfFieldLayer.enabled.value = false; // Make people use Depth of Field Manually
        }
Пример #28
0
 // Use this for initialization
 void Start()
 {
     motionBlur = this.GetComponent<MotionBlur>();
     noiseEffect = this.GetComponent<NoiseEffect>();
     PlayerMovement.Instance.RewindBegin += () => {
         applyEffects();
     };
     PlayerMovement.Instance.RewindEnd += () => {
         removeEffects();
     };
 }
    void Start()
    {
        //Os gameobjects a seguir sao inicializados para conseguir componentes de outros scripts utilizando
        //as variaveis ja declaradas.

        GameObject h = GameObject.Find ("Sihir");
        health = h.GetComponent<Hpsih> ();

        GameObject m = GameObject.Find ("RealCamera");
        mb = m.GetComponent<MotionBlur> ();
    }
Пример #30
0
    // Use this for initialization
    void Start()
    {
        v         = GetComponent <Vortex>();
        v.enabled = false;

        mb         = GetComponent <MotionBlur>();
        mb.enabled = false;

        ss = GetComponent <SunShafts>();

        p = GameObject.FindGameObjectWithTag("Player").GetComponent <Character>();
    }
Пример #31
0
 // Use this for initialization
 void Start()
 {
     StartCoroutine(FadeOut());
     destroyed      = false;
     nailCounter    = 30;
     NailText.text  = " Screws: " + nailCounter;
     Cursor.visible = false;
     nitrousCounter = 100f;
     Player         = GameObject.FindGameObjectWithTag("Player").GetComponent <AircraftVisual>();
     Sepia          = this.GetComponent <SepiaTone>();
     MotionBlur     = this.GetComponent <MotionBlur>();
 }
Пример #32
0
    void Awake()
    {
        anim       = GetComponent <Animator>();
        blur       = GetComponent <BlurOptimized>();
        glitch     = GetComponent <VideoGlitchSpectrumOffset>();
        motionBlur = GetComponent <MotionBlur>();
        noise      = GetComponent <NoiseAndGrain>();
        grayScale  = GetComponent <Grayscale>();

        maxHorizontalDistance = 1 - leftViewportLimit - (1 - rightViewportLimit);
        maxVerticalDistance   = 1 - bottomViewportLimit - (1 - topViewportLimit);
    }
    void Start()
    {
        _Instance           = this;
        camPosEvent         = BikeCamEvent.Null;
        NetworkServerScript = NetworkServerNet.GetInstance();

        if (mMotionBlur == null)
        {
            Debug.LogWarning("mMotionBlur is null");
        }
        BlurEffectScript.enabled = false;

        float[] distances = new float[32];
        for (int i = 0; i < 32; i++)
        {
            distances[i] = 400f;
        }
        distances[9]              = 260;
        distances[15]             = 100;
        distances[18]             = 600;
        distances[19]             = 50;
        distances[13]             = 250;
        distances[20]             = 50;
        distances[21]             = 250;
        camera.layerCullDistances = distances;

        Random.seed = (int)(Time.realtimeSinceStartup * 100000f);

        RainObj.SetActive(false);

        if (NetworkServerScript != null && !NetworkServerScript.GetIsServer())
        {
            Invoke("callBackgroundAudio", 3.5f);
        }

        mCamTran = transform;

        Screen.showCursor = false;
        smoothVal         = mSmooth * 0.015f;
        //smoothValTmp = smoothVal;

        if (mBike != null)
        {
            mBikePlayer = mBike;
        }

        mMotionBlur = gameObject.GetComponent <MotionBlur>();
        //		if(mMotionBlur == null)
        //		{
        //			ScreenLog.Log("BikeCamera::Start -> mMotionBlur is null!");
        //		}
    }
    public void PunchShake(Vector2 punchDirection, float hardness, float time, bool motionB)
    {
        punchDirection = (punchDirection / 10) * hardness;
        iTween.PunchPosition(Camera.main.gameObject, punchDirection, time);
        if (motionB)
        {
            MotionBlur motionBlur = Camera.main.GetComponent <MotionBlur>();
            motionBlur.blurAmount = .8f;
            motionBlur.Invoke("StopBlur", .2f);
        }

        Global.GameElements.AddShakiness(50 * hardness);
    }
Пример #35
0
        /// <summary>
        /// Call this once to initialise the renderer
        /// </summary>
        public virtual void Initialize(HostInterface CurrentHost, BaseOptions CurrentOptions)
        {
            currentHost    = CurrentHost;
            currentOptions = CurrentOptions;

            Background     = new Background(this);
            Fog            = new Fog();
            OpenGlString   = new OpenGlString(this);
            TextureManager = new TextureManager(currentHost);
            Cube           = new Cube(this);
            Rectangle      = new Rectangle(this);
            Loading        = new Loading(this);
            Keys           = new Keys(this);
            MotionBlur     = new MotionBlur(this);

            StaticObjectStates  = new List <ObjectState>();
            DynamicObjectStates = new List <ObjectState>();
            VisibleObjects      = new VisibleObjectLibrary(currentHost, Camera, currentOptions, this);
            try
            {
                DefaultShader = new Shader("default", "default", true);
                DefaultShader.Activate();
                DefaultShader.Deactivate();
            }
            catch
            {
                CurrentHost.AddMessage(MessageType.Error, false, "Initialising the default shaders failed- Falling back to legacy openGL.");
                CurrentOptions.IsUseNewRenderer = false;
            }

            GL.ClearColor(0.67f, 0.67f, 0.67f, 1.0f);
            GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);
            GL.Enable(EnableCap.DepthTest);
            GL.DepthFunc(DepthFunction.Lequal);
            SetBlendFunc(BlendingFactor.SrcAlpha, BlendingFactor.OneMinusSrcAlpha);
            GL.Hint(HintTarget.FogHint, HintMode.Fastest);
            GL.Hint(HintTarget.LineSmoothHint, HintMode.Fastest);
            GL.Hint(HintTarget.PerspectiveCorrectionHint, HintMode.Fastest);
            GL.Hint(HintTarget.PointSmoothHint, HintMode.Fastest);
            GL.Hint(HintTarget.PolygonSmoothHint, HintMode.Fastest);
            GL.Hint(HintTarget.GenerateMipmapHint, HintMode.Nicest);
            GL.Enable(EnableCap.CullFace);
            GL.CullFace(CullFaceMode.Front);
            GL.Disable(EnableCap.Texture2D);
            GL.Disable(EnableCap.Dither);
            GL.Disable(EnableCap.Lighting);
            GL.Disable(EnableCap.Fog);
            GL.Fog(FogParameter.FogMode, (int)FogMode.Linear);
        }
Пример #36
0
        private void renderMotionBlurSettings()
        {
            MotionBlur mb        = TexturesUnlimitedFXLoader.INSTANCE.CurrentProfile.GetSettingsFor <MotionBlur>();
            bool       enabled   = mb != null && mb.enabled;
            bool       showProps = AddEffectHeader("Motion Blur", mb);

            if (enabled && showProps)
            {
                AddFloatParameter("Shutter Angle", mb.shutterAngle, 0f, 360f);
                AddIntParameter("Sample Count", mb.sampleCount, 4, 32);
            }
            GUILayout.BeginHorizontal();
            GUILayout.Label("---------------------------------------");
            GUILayout.EndHorizontal();
        }
Пример #37
0
    void Start()
    {
        camera = GetComponent<Camera>();
        bloom = GetComponent<BloomOptimized>();
        motionBlur = GetComponent<MotionBlur>();
        grayscale = GetComponent<Grayscale>();

        bloom.enabled = false;
        motionBlur.enabled = false;
        isInThePast = false;
        difference = normalRoom.transform.position - pastRoom.transform.position;
        pastMusicSource.volume = 0;

        player = GameObject.FindGameObjectWithTag("Player");
        if (player == null)
            throw new UnassignedReferenceException("No player found.");
    }
Пример #38
0
	// Use this for initialization
	void Start () {
		motionblur = GetComponent<MotionBlur>();

	}
Пример #39
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;
    }
Пример #40
0
 public MotionBlur2D(MotionBlur b, SpriteRenderer sr)
     : base(b)
 {
     m_rSpriteRenderer = sr;
 }
	void Start () {
		blur = Camera.main.GetComponent<MotionBlur> ();
	}
Пример #42
0
 void Start()
 {
     instance = this;
     motionBlur = GetComponent<MotionBlur>();
 }
Пример #43
0
 public MotionBlur3D(MotionBlur b, MeshFilter mf) : base(b)
 {
     m_rMeshFilter = mf;
 }
Пример #44
0
 IEnumerator sober(MotionBlur mBlur)
 {
     yield return new WaitForSeconds(5);
     if (!dead)
         mBlur.enabled = false;
     timesDrunk--;
 }
Пример #45
0
 void Start()
 {
     Tripping = new float[6];
     Health = GetComponent<Health> ();
     if (GetComponent<Mana>()) {
         Mana = GetComponent<Mana>();
     }
     if (GetComponentInChildren<MotionBlur> ()) {
         blur = GetComponentInChildren<MotionBlur>();
         LookX = Player.TurnBody;
         LookY = Player.TurnHead;
         DrunkEndTime = Drunk.x;
     }
 }
Пример #46
0
    // Use this for initialization
    void Start()
    {
        layerMask = (1 << LayerMask.NameToLayer("Wall")) | (1 << LayerMask.NameToLayer("LevelObject"));
        capteur = new Ray(Vector3.zero, Vector3.zero);
        speed = basicSpeed;
        actualMana = maxMana;
        manabar.transform.gameObject.SetActive(true);
        mb = cameraPlayer.GetComponentInChildren<MotionBlur>();
        cameraRotation = new GameObject[4];

        for(int i=1; i<5; i++)
        {
            cameraRotation[i-1] = cameraPlayer.transform.FindChild("Position" + i).gameObject;
        }
        realCamera = cameraPlayer.transform.FindChild("CameraRotate").gameObject;

        positionSelected = 0;

        keyInput = InputManager.instance.getDirectionNow();

        if(keyInput == KeyCode.UpArrow){
            transform.eulerAngles = up;
        }else
        if(keyInput == KeyCode.DownArrow){
            transform.eulerAngles = down;
        }else
        if(keyInput == KeyCode.RightArrow){
            transform.eulerAngles = right;
        }else
        if(keyInput == KeyCode.LeftArrow){
            transform.eulerAngles = left;
        }
    }
	void Start () 
	{
		blur = Camera.main.GetComponent<MotionBlur> ();
		blur.blurAmount = bulrAmount;
		blur.extraBlur = extraBlur;
	}
Пример #48
0
 // Use this for initialization
 void Start()
 {
     m_BlurReference = GetComponent<MotionBlur> ();
     m_BlurReference.blurAmount = zero;
 }
Пример #49
0
 public MotionBlurBase(MotionBlur b)
 {
     m_rMotionBlur = b;
 }
Пример #50
0
 void Start()
 {
     blur = GameObject.Find("Player_Cam").GetComponent<MotionBlur>();
     timer = GameObject.FindWithTag("Player").GetComponent<RespawnTimer>();
     timeLimit = timer.getTimeLimit();
 }
 // Use this for initialization
 void Start()
 {
     motionBlurScript = cam.GetComponent ("MotionBlur") as MotionBlur;
     cameraMotionBlurScript = cam.GetComponent ("CameraMotionBlur") as CameraMotionBlur;
 }
Пример #52
0
	void Awake() {
		blur = GetComponent<MotionBlur>();
		bloom = GetComponent<Bloom>();
		origin = transform.position;
		posOffset = target.position - origin;
	}