Beispiel #1
0
    void OnCollisionEnter2D(Collision2D other)
    {
        if (other.gameObject.tag == "Despawner") //don't destroy if its the player's collider
        {
            Destroy(gameObject);
        }

        if (other.gameObject.tag == "Player")
        {
            spawner.CheckWordCollision(gameObject);
        }
    }