Example #1
0
 // Update is called once per frame
 void Update()
 {
     if (transform.position.y < DeadZone)
     {
         Destroy(GetComponent <Rigidbody>());
         Destroy(GetComponent <MeshRenderer>());
         Destroy(GetComponent <SphereCollider>());
         DeadPar.Play();
         InGame.Die();
     }
 }