Death Zone/Respawn möglich
This commit is contained in:
22
Assets/AssetsFORELLE/Script/respawnReload.cs
Normal file
22
Assets/AssetsFORELLE/Script/respawnReload.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
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");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user