Answers for "How to make a death zone in unity 2d"

C#
0

How to make a death zone in unity 2d

void Update() {
    
        
    }

    private void OnTriggerEnter2D(Collider2D collision)
    {
        if(collision.tag == "Player")
        {
            Destroy(collision.gameObject);
        }
    }
}
Posted by: Guest on August-12-2020

Code answers related to "How to make a death zone in unity 2d"

C# Answers by Framework

Browse Popular Code Answers by Language