Files
gmtk-2021/Assets/Deadend.cs
Jan Groß ee7a16dd2e Finalized for game jam submission
Lots of bugfixes
New tasks
2021-06-13 20:37:07 +02:00

18 lines
484 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Deadend : MonoBehaviour
{
private void OnTriggerEnter(Collider other)
{
//Debug.Log(string.Format("we collided with the thingie {0}", other.name));
if (other.GetComponent<DestructibleObject>() != null)
{
DestructibleObject destructibleObject = other.GetComponent<DestructibleObject>();
destructibleObject.Respawn();
}
}
}