Ejemplo n.º 1
0
    private void OnCollisionEnter2D(Collision2D collision)

    {
        firstBlockbool = FindObjectOfType <hotairballoon>();



        if (!(collision.gameObject.tag == "baseBlock"))
        {
            //if its not baseblock

            // firstBlockbool.resize();
            // firstBlockbool.collisonsubstracter();

            Destroy(collision.gameObject);
            Instantiate(blimps, this.transform.position, this.transform.rotation);

            Destroy(gameObject);


            firstBlockbool.updatelivesadd();
        }
        if ((collision.gameObject.tag == "baseBlock"))
        {
            // firstBlockbool.resize();
            //firstBlockbool.collisonsubstracter();
            firstBlockbool.birdfirstb();
            Destroy(collision.gameObject);
            Instantiate(blimps, this.transform.position, this.transform.rotation);

            Destroy(gameObject);
            firstBlockbool.updatelivesadd();
        }
    }
Ejemplo n.º 2
0
    private void OnCollisionEnter2D(Collision2D collision)

    {
        if (!(collision.gameObject.tag == "baseBlock"))
        {
            //if its not baseblock

            firstBlockbool.resize();


            Destroy(collision.gameObject);


            Destroy(gameObject);
            ;

            firstBlockbool.updatelivesadd();
        }
    }