mirror of
https://github.com/zoriya/ProtectFromTwitch.git
synced 2025-12-06 06:36:30 +00:00
14 lines
273 B
C#
14 lines
273 B
C#
using UnityEngine;
|
|
|
|
public class DeathDetector : MonoBehaviour
|
|
{
|
|
public GameObject DeathText;
|
|
|
|
private void OnCollisionEnter(Collision collision)
|
|
{
|
|
Destroy(collision.gameObject);
|
|
Time.timeScale = 0;
|
|
DeathText.SetActive(true);
|
|
}
|
|
}
|