Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var scorekeeper : ScoreKeeper;
- function Start () {
- scorekeeper = GameObject.FindObjectOfType(ScoreKeeper);
- }
- function OnCollisionEnter(other:Collision){
- if (other.gameObject.tag == "Ball"){
- scorekeeper.AddToScore();
- Destroy(this.gameObject);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement