You are on page 1of 1

using System.

Collections;
using System.Collections.Generic;
using UnityEngine;

public class ball_script : MonoBehaviour {

public Rigidbody rb;

// Use this for initialization


void Start () {
rb = GetComponent<Rigidbody>();
}

// Update is called once per frame


void Update () {

public void Die() {


Destroy (gameObject);

GameObject paddleObject = GameObject.Find ("Paddle");


paddle_script paddlescript = paddleObject.GetComponent<paddle_script>
();
paddlescript.SpawnBall ();
}
}

You might also like