Beispiel #1
0
    public void OnTriggerEnter2D(Collider2D collision)
    {
        playercontroler bird = collision.gameObject.GetComponent <playercontroler>();

        try
        {
            if (playerRigidBody.position != null)
            {
                bird.blackHoleInteraction(playerRigidBody.position); //call the interaction and send the position to the bird
            }
        }
        catch
        {
        }

        destroyBH = true;
    }