23 lines
415 B
C#
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");
|
||
|
}
|
||
|
}
|
||
|
}
|