Example #1
0
        public void Update()
        {
            position += direction * moveSpeed * Time.deltaTime;
            rotation += 360f * (moveSpeed / 10f) * Time.deltaTime;

            meshParticleSystem.UpdateQuad(quadIndex, position, rotation, quadSize, false, uvIndex);

            float slowDownFactor = 3.5f;

            moveSpeed -= moveSpeed * slowDownFactor * Time.deltaTime;
        }
        public void Update()
        {
            position += direction * Time.deltaTime * moveSpeed;
            rotation += 360f * (moveSpeed / 10f) * Time.deltaTime;

            meshParticleSystem.UpdateQuad(quadIndex, position, rotation, quadSize, true, 0);

            float slowdownFactor = 10f;

            moveSpeed -= moveSpeed * slowdownFactor * Time.deltaTime;
        }
Example #3
0
        public void Update()
        {
            if (onObject == true)
            {
                meshParticleSystem.UpdateQuad(quadIndex, position, rotation, quadSize, true, uvIndex);
            }
            else
            {
                position += direction * Time.deltaTime * moveSpeed;
                rotation += 360f * (moveSpeed / 4f) * Time.deltaTime;
                if (moveSpeed < 2.5f)
                {
                    float poolingFactor = Random.Range(1.0075f, 1.0015f);
                    quadSize *= poolingFactor;
                    // quadSize *= Mathf.Lerp(1, 1.1f, .1f);
                }

                meshParticleSystem.UpdateQuad(quadIndex, position, rotation, quadSize, true, uvIndex);

                float slowdownFactor = 20f;
                moveSpeed -= moveSpeed * slowdownFactor * Time.deltaTime;
            }
        }
Example #4
0
        public void Update()
        {
            uvIndexTimer += Time.deltaTime;
            if (uvIndexTimer >= uvIndexTimerMax)
            {
                uvIndexTimer -= uvIndexTimerMax;
                uvIndex++;
            }
            position += direction * moveSpeed * Time.deltaTime;

            meshParticleSystem.UpdateQuad(quadIndex, position, 0f, quadSize, false, uvIndex);

            float slowDownFactor = 3.5f;

            moveSpeed -= moveSpeed * slowDownFactor * Time.deltaTime;
        }
        public void Update()
        {
            position += direction * Time.deltaTime * moveSpeed;
            rotation += 360f * (moveSpeed / 10f) * Time.deltaTime;
            if (moveSpeed < 3f)
            {
                quadSize *= 1.008f;
            }


            float poolingFactor = Random.Range(1.0075f, 1.00085f);

            quadSize *= poolingFactor;

            meshParticleSystem.UpdateQuad(quadIndex, position, rotation, quadSize, true, uvIndex);

            // float slowdownFactor = 20f;
            // moveSpeed -= moveSpeed * slowdownFactor * Time.deltaTime;
        }
Example #6
0
        public void Update()
        {
            float        colliderSize = 1f;
            RaycastHit2D raycastHit2D = Physics2D.Raycast(position + direction * colliderSize, direction, moveSpeed * Time.deltaTime, hitLayerMask);

            if (raycastHit2D.collider != null)
            {
                // Hit something, stop!
                moveSpeed = 0f;
                return;
            }

            position += direction * moveSpeed * Time.deltaTime;
            rotation += 360f * (moveSpeed / 10f) * Time.deltaTime;

            meshParticleSystem.UpdateQuad(quadIndex, position, rotation, quadSize, false, uvIndex);

            float slowDownFactor = 3.5f;

            moveSpeed -= moveSpeed * slowDownFactor * Time.deltaTime;
        }