Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void OnCollisionEnter2D(Collision2D col)
- {
- if (col.gameObject.tag == "HardFloor" && col.relativeVelocity.magnitude > 100)
- {
- Debug.Log ("There has been a collision!");
- Destroy (col.gameObject);
- }
- else if (col.gameObject.tag == "otherTarget")
- {
- Debug.Log ("There has been a collision!");
- Destroy (col.gameObject);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement