Exemple #1
0
    private void OnCollisionEnter2D(Collision2D col)
    {
        if (col.gameObject.tag == "Ball")
        {
            StartCoroutine(Delay());
            GetComponent <BoxCollider2D>().enabled = false;
            Login.instance.score += 10;

            if (lg.levelTiles - 1 == 0)
            {
                lg.CheckLevel();
            }
            else
            {
                lg.levelTiles--;
            }

            if (booster)
            {
                Boosters.RandomBooster(transform.position);
            }
        }
    }