19 lines
414 B
C#
19 lines
414 B
C#
using UnityEngine;
|
|
using UnityEngine.SceneManagement;
|
|
|
|
|
|
public class Suicide : MonoBehaviour
|
|
{
|
|
// This method is called when a collision occurs
|
|
|
|
private void OnCollisionEnter(Collision collision)
|
|
{
|
|
// Check if the collision is with the specific object you want
|
|
if (collision.gameObject.CompareTag("Bullet"))
|
|
{
|
|
SceneManager.LoadScene("AfterLife");
|
|
}
|
|
}
|
|
|
|
}
|