void FixedUpdate()
    {
        if (bgManager == null || !bgManager.GetCanMove())
        {
            return;
        }

        sr.material.mainTextureOffset = new Vector2(0, currentOffset);
        currentOffset += (DifficultyManager.GetMovementSpeed() / 6);
    }
Exemplo n.º 2
0
    private void FixedUpdate()
    {
        if (!isSetupped)
        {
            return;
        }

        transform.position = Vector3.MoveTowards(transform.position, transform.position + Vector3.down, DifficultyManager.GetMovementSpeed());
        if (transform.position.y < bound.center.y - bound.extents.y - 1f)
        {
            DestroyShape();
        }
    }
Exemplo n.º 3
0
    private IEnumerator BackgroundStartCoroutine()
    {
        while (transform.position.y > maxStartPosY)
        {
            transform.position = Vector3.MoveTowards(transform.position, transform.position + Vector3.down, DifficultyManager.GetMovementSpeed());
            yield return(new WaitForFixedUpdate());
        }

        seamlessBg.Setup(this);
        canMove = true;
    }