2023-05-12 15:25:59 +02:00

23 lines
415 B
C#

using UnityEngine.SceneManagement;
using UnityEngine;
public class respawnReload : MonoBehaviour
{
void Start()
{
}
void Update()
{
}
private void OnCollisionEnter2D(Collision2D other)
{
if (other.gameObject.CompareTag("Player"))
{
SceneManager.LoadScene(SceneManager.GetActiveScene().name);
Debug.Log("Respawn: Reload");
}
}
}