Advertisement
Guest User

Untitled

a guest
Jan 16th, 2018
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. using UnityEngine;
  2.  
  3. public class Asteroide: MonoBehaviour
  4. {
  5. private void OnCollisionEnter2D(Collision2D collision)
  6. {
  7. if(collision.transform.tag == "weapon")
  8. {
  9. Score.GainScore();
  10. Destroy(gameObject);
  11. }
  12. }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement