Beispiel #1
0
    void OnEnable()
    {
        OnNewBlocOnTower = PubsubHandler.HandleNewBlocOnTower((int count, GameObject _bloc) =>
        {
            score           = count;
            scoreLabel.text = score.ToString();

            if (score > 1)
            {
                StartCoroutine(BumpText());

                if (score % 10 == 0)
                {
                    maxSize += 0.1f;
                }
            }
        });
    }
Beispiel #2
0
    void OnEnable()
    {
        OnNewBlocOnTower = PubsubHandler.HandleNewBlocOnTower((int count, GameObject bloc) =>
        {
            blocCount = count;
            transform.Translate(Vector3.down * step);

            if (blocCount % 10 == 0)
            {
                GameObject movingBackground = Instantiate(movingBackgroundPrefab);

                movingBackground.transform.position = new Vector3(
                    transform.position.x,
                    5,
                    transform.position.z
                    );
            }
        });
    }