Example #1
0
        private void Update()
        {
            if (!Input.GetMouseButtonDown(0))
            {
                return;
            }
            if (!EventSystem.current.IsPointerOverGameObject())
            {
                Vector2 pos;

                if (drawer.PixelPosAtScreenPos(Input.mousePosition, out pos))
                {
                    pos.Set(Mathf.RoundToInt(pos.x), Mathf.RoundToInt(pos.y));
                    Splode(pos, radius);
                }
            }
        }
        private void Update()
        {
            if (!Input.GetMouseButton(0))
            {
                return;
            }
            if (!EventSystem.current.IsPointerOverGameObject())
            {
                Vector2 pos;
                int     c;

                if (drawer.PixelPosAtScreenPos(Input.mousePosition, out pos))
                {
                    pos.Set(Mathf.RoundToInt(pos.x), Mathf.RoundToInt(pos.y));

                    for (c = 0; c < cc; c++)
                    {
                        Fire.CreateFlameAt(drawer, pos + UnityEngine.Random.insideUnitCircle * 5f);
                    }
                }
            }
        }
        void Update()
        {
            if (!Input.GetMouseButton(0))
            {
                return;
            }

            if (!EventSystem.current.IsPointerOverGameObject())
            {
                Vector2 pos;
                int     c;

                if (drawer.PixelPosAtScreenPos(Input.mousePosition, out pos))
                {
                    pos.Set(Mathf.RoundToInt(pos.x), Mathf.RoundToInt(pos.y));

                    for (c = 0; c < cc; c++)
                    {
                        drawer.CreateLivePixel <Snow>(pos, brush);
                    }
                }
            }
        }
        void Update()
        {
            if (!Input.GetMouseButton(0))
            {
                return;
            }
            if (!EventSystem.current.IsPointerOverGameObject())
            {
                Vector2 pos;
                int     c;

                if (drawer.PixelPosAtScreenPos(Input.mousePosition, out pos))
                {
                    pos.Set(Mathf.RoundToInt(pos.x), Mathf.RoundToInt(pos.y));

                    for (c = 0; c < cc; c++)
                    {
                        HelperAPIMethods.RandomVelocity(ref velo, -.2f, .5f, 0, -1f);
                        drawer.CreateLivePixel <Water>(pos, brush).velocity = 60f * velo;
                    }
                }
            }
        }
        void Update()
        {
            if (!Input.GetMouseButton(0))
            {
                return;
            }

            if (!EventSystem.current.IsPointerOverGameObject())
            {
                Vector2 pos;
                int     c;

                if (drawer.PixelPosAtScreenPos(Input.mousePosition, out pos))
                {
                    pos.Set(Mathf.RoundToInt(pos.x), Mathf.RoundToInt(pos.y));

                    for (c = 0; c < cc; c++)
                    {
                        drawer.CreateLivePixel <Sands>(pos, brush).velocity =
                            20f * UnityEngine.Random.insideUnitCircle;
                    }
                }
            }
        }