Ejemplo n.º 1
0
        protected override void instructions()
        {
            double v   = (double)parameters["Weight"].value;
            Bitmap res = Blur.Sharpen(ImageStream.CurrentImage.Bitmap, (int)v);

            ImageStream.CurrentImage.FlushBitmap(res);
        }
Ejemplo n.º 2
0
        private static IEnumerable <IParameter> ComputeBlurOffsetsAndWeights(int index, Entity entity, InitializerParameters parameters)
        {
            bool isHorizontal = parameters.Technique.Name == "PostProcess.GaussianBlurH";
            var  cPostProcess = entity.GetComponent <PostProcessComponent>();

            float texelWidth;
            float texelHeight;
            var   cBlur = entity.GetComponent <BlurComponent>();

            if (isHorizontal)
            {
                texelWidth  = 1.0f / (cPostProcess.OutputWidth * cBlur.DownScale);
                texelHeight = 0;
            }
            else
            {
                texelWidth  = 0;
                texelHeight = 1.0f / (cPostProcess.OutputHeight * cBlur.DownScale);
            }
            Vector2[] offsets;
            float[]   weights;
            Blur.ComputeParameters(texelWidth, texelHeight, out weights, out offsets);
            Vector4[] data = new Vector4[Blur.SampleCount];
            for (int i = 0; i < data.Length; i++)
            {
                data[i] = new Vector4(offsets[i].X, offsets[i].Y, weights[i], 0);
            }
            return(new[] { new Float4ArrayParameter(index, data.Length, Param.Floats.BlurOffsetsAndWeights, () => data) });
        }
Ejemplo n.º 3
0
        //winform点击窗体上面任何地方都触发的事件是什么 http://q.cnblogs.com/q/50865/

        private void JLeableTextBox_Load(object sender, EventArgs ex)
        {
            txtBox.MouseCaptureChanged += (s, e) =>
            {
                var pt = txtBox.PointToClient(Control.MousePosition);
                if (txtBox.Capture == false)
                {
                    if (pt.X < 0 || pt.Y < 0 || pt.X > txtBox.Width || pt.Y > txtBox.Height)
                    {
                        txtBox.Hide();
                        lblText.Text = txtBox.Text;
                        lblText.Show();
                        Blur.Invoke(this, e);
                    }
                    else
                    {
                        txtBox.Capture = true;
                    }
                }
            };
            lblText.Click += (s, e) =>
            {
                txtBox.Capture = true;
                lblText.Hide();
                txtBox.Show();
                txtBox.Focus();
            };
            txtBox.Hide();
            lblText.Show();
        }
Ejemplo n.º 4
0
        private void BtnDelete_Click(object sender, EventArgs e)
        {
            if (!Util.Func.IsUserAllowed(User, Util.PermissionAlertType.Alert))
            {
                return;
            }

            Blur blur = new Blur(this.ParentForm, UIConstants.ThirdFormBlurOpacity);

            blur.Show();

            MessageDialog messageDialog = new MessageDialog
            {
                DialogButtonsIndex = MessageDialog.DialogButtons.Two,
                DialogIconIndex    = MessageDialog.DialogIcon.Sorry,
                SecondBtnText      = "No",
                ThirdBtnText       = "Yes",
                ThirdBtnColor      = Color.Tomato,
                Title   = "Are you sure ?",
                Message = $"Are you sure you want to permanently delete { Group.Name }, this group will be deleted immediately. You can't undo this action.",
                TopMost = true,
            };

            var dialogResult = messageDialog.ShowWithEvent();

            if (dialogResult == MessageDialog.OnClickEvent.ThirdButton)
            {
                //Delete
                DeleteGroup();
            }

            blur.Close();
        }
Ejemplo n.º 5
0
    IEnumerator Nitro()
    {
        yield return(new WaitForSeconds(0.5f));

        if (SwipeController.Instance.IsSwiping(SwipeDirection.Up) && nitroOk == true && nNitros >= 1)
        //if (SwipeController.Instance.IsSwiping(SwipeDirection.Up))
        {
            maxMotorTorque = 300;
            //CameraScript.pov = true;
            NitroP.SetActive(true);
            Blur.SetActive(true);
            nNitros--;
        }
        else if (SwipeController.Instance.IsSwiping(SwipeDirection.None))
        {
            Debug.Log("Voltei ao normal");
            NitroP.SetActive(false);
            Blur.SetActive(false);
            StartCoroutine("Back");
        }


        if (SwipeController.Instance.IsSwiping(SwipeDirection.Down))
        {
            motor--;
        }
    }
Ejemplo n.º 6
0
        public void UpdateMessageAddress(string messageaddress)
        {
            MessageAddress = messageaddress;

            Feedback.UpdateMessageAddress(String.Format("{0}{1}/", messageaddress, nameof(Feedback)));
            Blur.UpdateMessageAddress(String.Format("{0}{1}/", messageaddress, nameof(Blur)));
        }
Ejemplo n.º 7
0
        public CameraData(Camera cam)
        {
            this.blurBK = (CameraData.BlurBK)null;
            this.dofBK  = (CameraData.DOFBK)null;
            if (Object.op_Equality((Object)cam, (Object)null))
            {
                return;
            }
            this.rect   = cam.get_rect();
            this.parent = ((Component)cam).get_transform().get_parent();
            this.fov    = cam.get_fieldOfView();
            this.far    = cam.get_farClipPlane();
            Blur component1 = (Blur)((Component)cam).GetComponent <Blur>();

            if (Object.op_Inequality((Object)component1, (Object)null))
            {
                this.blurBK = new CameraData.BlurBK(component1);
            }
            DepthOfField component2 = (DepthOfField)((Component)cam).GetComponent <DepthOfField>();

            if (!Object.op_Inequality((Object)component2, (Object)null))
            {
                return;
            }
            this.dofBK = new CameraData.DOFBK(component2);
        }
Ejemplo n.º 8
0
 private void OnDestroy()
 {
     mStateManager    = null;
     mUIShipCharacter = null;
     mUserInterfacePortInteriorManager = null;
     mUserInterfacePortMenuManager     = null;
     mBlur_Camera = null;
     if ((UnityEngine.Object)mParticleSystem_MarriagePetal != null)
     {
         mParticleSystem_MarriagePetal.Stop();
     }
     mParticleSystem_MarriagePetal     = null;
     mTransform_LayerPort              = null;
     mTransform_LayerOverlay           = null;
     mUIInteriorFurniturePreviewWaiter = null;
     mUIPortCameraControlMode          = null;
     mCamera_Overlay             = null;
     mCamera_MenuCamera          = null;
     mUserInterfaceOptionManager = null;
     mCommonDialog                = null;
     mUIMarriageConfirm           = null;
     mUserInterfaceJukeBoxManager = null;
     mPortManager        = null;
     mDeckModel          = null;
     mKeyController      = null;
     TutorialInstantiate = null;
 }
Ejemplo n.º 9
0
        void DisplayCustomerGroup(Enums.Task task)
        {
            //Add Blur
            Blur blur = new Blur(this.ParentForm, UIConstants.FormBlurOpacity);

            blur.Show();

            Forms.Customers.CustomerGroup customerGroup = new Forms.Customers.CustomerGroup
            {
                Group   = Group,
                Task    = task,
                TopMost = true
            };

            // Update If Updated
            var formResponse = customerGroup.ShowWithResponse();

            if (formResponse.ActionDialog == Enums.ActionDialog.Updated)
            {
                Group = (Backend.Objects.CustomerGroup)formResponse.Data;

                //Force Update
                this.Initialize();
            }

            //Remove Blur
            blur.Close();
        }
Ejemplo n.º 10
0
        private void BtnAddSupplier_Click(object sender, EventArgs e)
        {
            if (!Util.Func.IsUserAllowed(user, Util.PermissionAlertType.Message, this.ParentForm))
            {
                return;
            }

            ///Add Blur
            Blur blur = new Blur(this.ParentForm, UIConstants.FormBlurOpacity);

            blur.Show();

            Supplier supplier = new Supplier
            {
                OnCreate = OnCreateSupplier,
                Task     = Enums.Task.Create,
                TopMost  = true
            };

            // Update
            var dialogResult = supplier.ShowWithResult();

            // Remove Blur
            blur.Close();
        }
Ejemplo n.º 11
0
 private void blur(AnomalousMvcContext context)
 {
     this.slideEditorController.VectorModeChanged -= slideEditorController_VectorModeChanged;
     commitText();
     if (editorController.ResourceProvider != null) //If this is null the project is closed, no reason to try to save the text
     {
         foreach (RmlSlidePanel panel in slide.Panels.Where(p => p is RmlSlidePanel))
         {
             String editorName = panel.createViewName("RmlView");
             var    editor     = rmlEditors[editorName];
             if (editor.Component != null && editor.Component.ChangesMade)
             {
                 String rml = editor.getCurrentComponentText();
                 editor.CachedResource.CachedString = rml;
                 editorController.ResourceProvider.ResourceCache.add(editor.CachedResource);
             }
         }
     }
     slideLayoutPicker.destroyLayoutPicker();
     GlobalContextEventHandler.disableEventContext(eventContext);
     htmlDragDrop.DestroyIconPreview();
     panelResizeWidget.destroyResizeWidget();
     if (Blur != null)
     {
         Blur.Invoke(this);
     }
 }
Ejemplo n.º 12
0
            public void UpdateBlurTex(Data data, Blur blur, Texture source, Material mat)
            {
                if (NeedResize(thresholdTex, glowTex.width, glowTex.height))
                {
                    thresholdTex = Resize(ref thresholdTex, glowTex);
                }
                var vthresh = new Vector4(data.threshold, 1f / Mathf.Clamp(1f - data.threshold, 0.1f, 1f), 0f, 0f);

                mat.SetFloat(P_INTENSITY, data.intensity);
                mat.SetVector(P_THREAHOLD, vthresh);
                mat.shaderKeywords = null;
                if (data.thresholdMode != KeywordThreshold.___)
                {
                    mat.EnableKeyword(data.thresholdMode.ToString());
                }
                if (data.alphaUsage != default)
                {
                    mat.EnableKeyword(data.alphaUsage.ToString());
                }
                Graphics.Blit(glowTex, thresholdTex, mat, (int)ShaderPass.Threshold);

                var tmpBlurIter = data.iterations;

                data.blurResolution = Mathf.Max(4, data.blurResolution);
                blur.FindSize(source.height, data.blurResolution, out tmpBlurIter, out int tmpBlurLod);
                blur.Render(thresholdTex, ref blurred, tmpBlurIter, tmpBlurLod);
            }
Ejemplo n.º 13
0
    private void FadeInDeathScreen()
    {
        if (fadeInDeathScreen == false)
        {
            return;
        }

        deathScreenCanvasGroup.alpha += Time.deltaTime;
        deathScreenCanvasGroup.alpha  = Mathf.Clamp01(deathScreenCanvasGroup.alpha);
        Blur.SetBlurAmount(deathScreenCanvasGroup.alpha * 25f);

        if (Input.GetKey(KeyCode.Space))
        {
            restartAmount += Time.deltaTime * 2f;
        }
        else
        {
            restartAmount -= Time.deltaTime;
        }

        holdSpaceImage.fillAmount = restartAmount;

        if (restartAmount >= 1f)
        {
            SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex);
        }

        restartAmount = Mathf.Clamp01(restartAmount);

        lowPass.cutoffFrequency = Mathf.Lerp(lowPass.cutoffFrequency, 500, Time.deltaTime);
    }
Ejemplo n.º 14
0
        private void BtnAddUser_Click(object sender, EventArgs e)
        {
            if (!Util.Func.IsUserAllowed(user, Util.PermissionAlertType.Message, this.ParentForm))
            {
                return;
            }

            Blur blur = new Blur(this.ParentForm, 0.60);

            blur.Show();

            Forms.User createUserForm = new Forms.User
            {
                Task    = Enums.Task.Create,
                TopMost = true
            };

            //Update
            var dialogResult = createUserForm.ShowWithDialog();

            if (dialogResult == Enums.ActionDialog.Created)
            {
                //Delete To Avoid Duplicate
                UsersGrid.Controls.Clear();
                GetUsers();
            }
            blur.Close();
        }
Ejemplo n.º 15
0
 // Use this for initialization
 void Start()
 {
     GBM           = GetComponent <GameBooleanManager>();
     GSM           = GetComponent <GameSceneManager>();
     SKM           = GetComponent <SkillManager>();
     HUD           = GetComponent <HUDManager>();
     MainCamera    = Camera.main.gameObject;
     blur          = MainCamera.GetComponent <Blur>();
     puaseAnim     = PuaseGroup.GetComponent <Animator>();
     SkillAnim     = SkillGroup.GetComponent <Animator>();
     MessageAnim   = MessageGroup.GetComponent <Animator>();
     audioListener = GetComponent <AudioListener>();
     AudioImage    = SoundButton.GetComponent <Image>();
     for (int i = 1; i <= 6; i++)
     {
         SKM.useSkill[i] = PlayerPrefs.GetInt("skill" + i);                         //限制技能使用
     }
     LoadSKillUnlock();
     if (PlayerPrefs.GetInt("SoundOn") == 0)
     {
         audioListener.enabled = false;
         AudioImage.sprite     = AssetConfig.Audio_off_Image;
     }
     else
     {
         audioListener.enabled = true;
         AudioImage.sprite     = AssetConfig.Audio_on_Image;
     }
 }
Ejemplo n.º 16
0
 /** [シングルトン]インスタンス。作成。
  */
 public static void CreateInstance()
 {
     if (s_instance == null)
     {
         s_instance = new Blur();
     }
 }
Ejemplo n.º 17
0
        public async Task SaveLayers()
        {
            Blur b  = new Blur();
            var  dr = new BallDrainageSimulator();

            var vl = new VisualLogger();

            var file   = "SavedFiles/rvrnw.bmp";
            var i      = Image.FromFile(file);
            var bitmap = new Bitmap(i);

            var layer = new LayerConverter().LoadLayer(bitmap);



            ILayer blured = new Layer2DObject(layer.Resolution);

            //b.Process(layer, blured, 3);
            blured = layer;
            vl.Log(blured, "base");
            var drainagemap = dr.GetDrainageMap(blured, 10);

            //logger shit
            drainagemap[0, 0] = 0;
            vl.Log(drainagemap, "drainage");
        }
Ejemplo n.º 18
0
        private void BtnRedeem_Click(object sender, EventArgs e)
        {
            if (!Util.Func.IsUserAllowed(User, Util.PermissionAlertType.Message, this))
            {
                return;
            }

            Blur blur = new Blur(this, UIConstants.ThirdFormBlurOpacity);

            blur.Show();

            //Edit Customer
            RedeemCustomer redeemCustomer = new RedeemCustomer
            {
                Customer = Customer,
                Currency = Currency,
                TopMost  = true,
            };

            // Update If Updated
            var formResponse = redeemCustomer.ShowWithResponse();

            if (formResponse.ActionDialog == Enums.ActionDialog.Redeem)
            {
                ActionDialog = Enums.ActionDialog.Updated;
                Customer     = (Backend.Objects.Customer)formResponse.Data;

                //Force Update
                this.Initialize();
            }

            blur.Close();
        }
Ejemplo n.º 19
0
        private void BtnAddCustomer_Click(object sender, EventArgs e)
        {
            if (!Util.Func.IsUserAllowed(User, Util.PermissionAlertType.Message, this.ParentForm))
            {
                return;
            }

            Blur blur = new Blur(this.ParentForm, UIConstants.FormBlurOpacity);

            blur.Show();

            Forms.Customers.Customer customerForm = new Forms.Customers.Customer
            {
                OnCreate = OnCreateCustomer,
                Task     = Enums.Task.Create,
                TopMost  = true
            };

            var dialogResult = customerForm.ShowWithResult();

            if (dialogResult == Enums.ActionDialog.Created)
            {
                //Delete To Avoid Duplicate
                CustomersGrid.Controls.Clear();
                GetCustomers();
            }

            blur.Close();
        }
Ejemplo n.º 20
0
        private void BtnAddBrand_Click(object sender, EventArgs e)
        {
            //Add Blur
            Blur blur = new Blur(this.ParentForm, UIConstants.FormBlurOpacity);

            blur.Show();

            Brand brand = new Brand
            {
                OnCreate = OnCreateBrand,
                Task     = Enums.Task.Create,
                TopMost  = true
            };

            //Update
            var dialogResult = brand.ShowWithResult();

            if (dialogResult == Enums.ActionDialog.Created)
            {
                //Delete To Avoid Duplicate
                //BrandsGrid.Controls.Clear();
                //GetBrands();
            }

            //Remove Blur
            blur.Close();
        }
Ejemplo n.º 21
0
        private void blurToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Blur blur = new Blur();

            blurImage         = blur.Apply(originalImage);
            pictureBox6.Image = blurImage;
        }
Ejemplo n.º 22
0
        private void BtnEdit_Click(object sender, EventArgs e)
        {
            Blur blur = new Blur(this, UIConstants.ThirdFormBlurOpacity);

            blur.Show();

            //Edit Supplier
            Supplier supplierForm = new Supplier
            {
                ProductSupplier = Supplier,
                TopMost         = true,
                Task            = Enums.Task.Update,
            };

            // Update If Updated
            var formResponse = supplierForm.ShowWithResponse();

            if (formResponse.ActionDialog == Enums.ActionDialog.Updated)
            {
                ActionDialog = Enums.ActionDialog.Updated;
                Supplier     = (Backend.Objects.ProductSupplier)formResponse.Data;

                //Force Update
                this.Initialize();
            }
            else if (formResponse.ActionDialog == Enums.ActionDialog.Deleted)
            {
                // Close -> Nothing to show
                ActionDialog = Enums.ActionDialog.Deleted;
                this.Close();
            }

            blur.Close();
        }
Ejemplo n.º 23
0
        void Start()
        {
            blur = Camera.main.GetComponent<Blur>();
            Gamestatemanager.ChangeInGameMenuHandler += Gamestatemanager_ChangeInGameMenuHandler;

            blur.enabled = false;
        }
Ejemplo n.º 24
0
        private void BtnEdit_Click(object sender, EventArgs e)
        {
            Blur blur = new Blur(this.ParentForm, UIConstants.FormBlurOpacity);

            blur.Show();

            Forms.Products.Product product = new Forms.Products.Product
            {
                ProductObject = Product,
                Task          = Enums.Task.Update,
                TopMost       = true
            };

            // Update If Updated
            var formResponse = product.ShowWithResponse();

            if (formResponse.ActionDialog == Enums.ActionDialog.Updated)
            {
                Product = (Backend.Objects.Product)formResponse.Data;

                //Force Update
                this.Initialize();
            }
            else if (formResponse.ActionDialog == Enums.ActionDialog.Deleted)
            {
                // Delete -> Nothing to show
                this.OnDelete(this, e);
                this.Hide();
            }

            blur.Close();
        }
Ejemplo n.º 25
0
        void DisplayCustomerGroup(Enums.Task task)
        {
            //Add Blur
            Blur blur = new Blur(this.ParentForm, UIConstants.FormBlurOpacity);

            blur.Show();

            Brand brand = new Brand
            {
                ProductBrand = Brand,
                Task         = task,
                TopMost      = true
            };

            // Update If Updated
            var formResponse = brand.ShowWithResponse();

            if (formResponse.ActionDialog == Enums.ActionDialog.Updated)
            {
                Brand = (Backend.Objects.ProductBrand)formResponse.Data;

                //Force Update
                this.Initialize();
            }

            //Remove Blur
            blur.Close();
        }
Ejemplo n.º 26
0
 // <summary>
 // 加载完成立即初始化的操作
 // </summary>
 public override void Init()
 {
     m_Emoji1.gameObject.SetActive(false);
     m_Emoji2.gameObject.SetActive(false);
     //
     m_HeroPos1 = m_HeroAni1.GetComponent <RectTransform>().localPosition;
     m_HeroPos2 = m_HeroAni2.GetComponent <RectTransform>().localPosition;
     if (Camera.main != null)
     {
         m_blr = Camera.main.GetComponent <Blur>();
         if (m_blr != null)
         {
             rawImage.gameObject.SetActive(true);
             m_blr.SetRawImage(rawImage);
         }
         else
         {
             rawImage.gameObject.SetActive(false);
         }
     }
     else
     {
         rawImage.gameObject.SetActive(false);
     }
     HideAllAniGo();
 }
Ejemplo n.º 27
0
        private void OnClick(object sender, EventArgs e)
        {
            Blur blur = new Blur(this.ParentForm, UIConstants.FormBlurOpacity);

            blur.Show();

            SupplierDetails supplierDetails = new SupplierDetails
            {
                Supplier = Supplier,
                Task     = Enums.Task.Get,
                TopMost  = true
            };

            //Update If Updated
            var formResponse = supplierDetails.ShowWithResponse();

            if (formResponse.ActionDialog == Enums.ActionDialog.Updated)
            {
                Supplier = (Backend.Objects.ProductSupplier)formResponse.Data;

                //Force Update
                this.Initialize();
            }
            else if (formResponse.ActionDialog == Enums.ActionDialog.Deleted)
            {
                // Delete -> Nothing to show
                this.OnDelete(this, e);
                this.Hide();
            }

            blur.Close();
        }
Ejemplo n.º 28
0
        private void BtnDelete_Click(object sender, EventArgs e)
        {
            Blur blur = new Blur(this, UIConstants.MinBlurOpacity);

            blur.Show();

            MessageDialog messageDialog = new MessageDialog
            {
                DialogButtonsIndex = MessageDialog.DialogButtons.Two,
                DialogIconIndex    = MessageDialog.DialogIcon.Sorry,
                SecondBtnText      = "No",
                ThirdBtnText       = "Yes",
                ThirdBtnColor      = Color.Tomato,
                Title   = "Are you sure ?",
                Message = $"Are you sure you want to permanently delete { Supplier.Name }, this supplier will be deleted immediately. You can't undo this action.",
                TopMost = true,
            };

            var dialogResult = messageDialog.ShowWithEvent();

            if (dialogResult == MessageDialog.OnClickEvent.ThirdButton)
            {
                ActionDialog = Enums.ActionDialog.Deleted;
                //Delete
                DeleteSupplier();
            }

            blur.Close();
        }
Ejemplo n.º 29
0
        private void OnDisable()
        {
            NotifyBlurredTexOnUpdate(null);

            if (blur != null)
            {
                blur.Dispose();
                blur = null;
            }
            if (bDepthTex != null)
            {
                bDepthTex.DestroySelf();
                bDepthTex = null;
            }
            if (maskTex0 != null)
            {
                maskTex0.Dispose();
                maskTex0 = null;
            }
            if (maskTex1 != null)
            {
                maskTex1.Dispose();
                maskTex1 = null;
            }
            if (ramm != null)
            {
                ramm.Dispose();
                ramm = null;
            }
            if (pip != null)
            {
                pip.Dispose();
                pip = null;
            }
        }
Ejemplo n.º 30
0
 void Start()
 {
     objetoSomSub = new GameObject();
     objetoSomSub.AddComponent(typeof(AudioSource));
     objetoSomSub.GetComponent <AudioSource> ().loop = true;
     objetoSomSub.transform.localPosition            = new Vector3(0, 0, 0);
     objetoSomSub.GetComponent <AudioSource> ().clip = somSubmerso;
     objetoSomSub.transform.parent = transform;
     objetoSomSub.SetActive(false);
     //
     _fisheye = GetComponent <Fisheye> ();
     _blur    = GetComponent <Blur> ();
     _edge    = GetComponent <EdgeDetection> ();
     _vortex  = GetComponent <Vortex> ();
     //
     GetComponent <SphereCollider> ().radius    = 0.005f;
     GetComponent <SphereCollider> ().isTrigger = false;
     GetComponent <Rigidbody> ().isKinematic    = true;
     GetComponent <Camera> ().nearClipPlane     = 0.01f;
     //
     _blur.iterations = 5 - DistanciaDeVisib;
     _blur.blurSpread = 1 - (Visibilidade / 10);
     //
     _vortex.radius = new Vector2(1, 1);
     _vortex.center = new Vector2(0.5f, 0.5f);
     //
     _edge.mode             = EdgeDetection.EdgeDetectMode.TriangleLuminance;
     _edge.lumThreshold     = 0;
     _edge.sampleDist       = 0;
     _edge.edgesOnly        = intensidadeCor;
     _edge.edgesOnlyBgColor = corAgua;
     //
     _blur.enabled    = false;
     _fisheye.enabled = false;
     _edge.enabled    = false;
     _vortex.enabled  = false;
     //
     planoGotas = GameObject.CreatePrimitive(PrimitiveType.Plane);
     Destroy(planoGotas.GetComponent <MeshCollider> ());
     planoGotas.transform.localScale       = new Vector3(0.02f, 0.02f, 0.02f);
     planoGotas.transform.parent           = transform;
     planoGotas.transform.localPosition    = new Vector3(0, 0, 0.05f);
     planoGotas.transform.localEulerAngles = new Vector3(90, 180, 0);
     planoGotas.GetComponent <Renderer>().material.shader = Shader.Find("FX/Glass/Stained BumpDistort");
     planoGotas.GetComponent <Renderer> ().material.SetTexture("_BumpMap", TexturaPingos);
     planoGotas.GetComponent <Renderer> ().material.SetFloat("_BumpAmt", 0);
     //
     if (GetComponent <SunShafts> () != null)
     {
         temSunShafts  = true;
         _sunShafts    = GetComponent <SunShafts> ();
         intSolInicial = _sunShafts.sunShaftIntensity;
     }
     else
     {
         temSunShafts = false;
     }
     //
     _audSourc = GetComponent <AudioSource> ();
 }
Ejemplo n.º 31
0
 void UseBlur(Blur blur)
 {
     blur.useBlur = useBlur;
     blur.blurMat = blurMat;
     blur.times   = blurTimes;
     blur.offset  = blurOffset / 128.0f;
 }
Ejemplo n.º 32
0
    // Use this for initialization
    void Start()
    {
        //	txt = gameObject.GetComponent<Text>();

        be = camera.GetComponent<Blur>();

        tbo = camera.GetComponent<TBOrbit>();
    }
Ejemplo n.º 33
0
	void Start () {
			if (camera != null) {
				blurEffect = camera.gameObject.GetComponent<Blur> ();
				noiseEffect = camera.gameObject.GetComponent<NoiseAndGrain> ();
				vignetteEffect = camera.gameObject.GetComponent<VignetteAndChromaticAberration> ();
			}

			DisableVisualEffect ();
	}
Ejemplo n.º 34
0
    // Use this for initialization
    void Start()
    {
        //	txt = gameObject.GetComponent<Text>();

        be = camera.GetComponent<Blur>();

        InvokeRepeating("Blur", 0, 0.1f);

        be.blurSize = 10.0f;
    }
Ejemplo n.º 35
0
    void Awake()
    {
        Services.DrugCameraEffects = this;

        sun = this.GetComponent<SunShafts>();

        noiseEffect = this.GetComponent<NoiseEffect>();
        vortexEffect = this.GetComponent<VortexEffect>();
        blur = this.GetComponent<Blur>();
        trailRenderer = GameObject.Find("John").GetComponent<TrailRenderer>();

        Services.GameState.PlayerState.WeedChangedEvent += HandleWeedChangedEvent;
    }
Ejemplo n.º 36
0
 void Awake()
 {
     player = GameObject.FindGameObjectWithTag(Tags.player);
     if(player != null)
     {
         playerViewport = player.GetComponentInChildren<Camera>();
         viewportBlur = player.GetComponentInChildren<Blur>();
         playerInput = player.GetComponent<Player_Input>();
     }
     contextMessage.text = "";
     
     if (SceneManager.GetActiveScene().buildIndex == 2)
         levelController = GameObject.FindGameObjectWithTag(Tags.levelController).GetComponent<MainLevelController>();
 }
Ejemplo n.º 37
0
    // Use this for initialization
    void Start()
    {
        //	txt = gameObject.GetComponent<Text>();

        be = camera.GetComponent<Blur>();
        //text = guiTitle.GetComponent<SpriteRenderer> ();

        be.enabled = true;

        InvokeRepeating("Blur", 0, 0.1f);

        //startTime = Time.time;

        be.blurSize = 10.0f;
    }
Ejemplo n.º 38
0
    // Use this for initialization
    void Start()
    {
        gesture = GestureTypes.None;
        gameManager = GameManager.Start;
        currentZone = Zones.none;

        ResetZonesColor();

        // init cam position
        toRotation = transform.rotation;
        rotation = toRotation;
        Vector3 negDistance = new Vector3(0.0f, 0.0f, -distance);
        Vector3 position = rotation * negDistance + target.position;
        transform.rotation = rotation;
        transform.position = position;

        Vector3 angles = transform.eulerAngles;
        rotationYAxis = angles.y;
        rotationXAxis = angles.x;

        // Make the rigid body not change rotation
        if (GetComponent<Rigidbody>())
        {
            GetComponent<Rigidbody>().freezeRotation = true;
        }

        be = GetComponent<Camera>().GetComponent<Blur>();
        audio = GetComponent<AudioSource>();
    }
Ejemplo n.º 39
0
    // Use this for initialization
    void Start()
    {
        audio = GetComponent<AudioSource>();
        audio.volume = 0;
        audio.enabled = false;

        enabled = false;
        increasing = false;
        decreasing = false;
        countingDown = false;

        NPCsLookingAtPlayer = "null_npc";
        PlayerLookingNPCTarget = "null_player";

        currentBlur = GetComponent<Blur>();
        currentVign = GetComponent<Vignetting>();
        currentTwirl = GetComponent<TwirlEffect>();
        currentVortex = GetComponent<VortexEffect>();

        vignDefaultIntensity = currentVign.intensity;

        currentBlur.enabled = false;
        currentVign.enabled = false;
        currentTwirl.enabled = false;
        currentVortex.enabled = false;
    }
Ejemplo n.º 40
0
    void Start()
    {
        fastBloom = Camera.main.gameObject.GetComponent<FastBloom>();

        if( fastBloom )
        {
            fastBloom.enabled = true;
            StartCoroutine( "DoBloomFade" );
        }

        blur = Camera.main.gameObject.GetComponent<Blur> ();

        if( blur )
        {
            blur.enabled = true;
            StartCoroutine( "DoBlurFade" );
        }
    }
Ejemplo n.º 41
0
	void Start () {
		_blur = Camera.main.GetComponent<Blur> ();
		_cam = Camera.main.GetComponent<Stratecam> ();
	}