LieutenantChampignon/Projet Unity/Lieutenant Champignon/Assets/Scripts/Killer.cs

14 lines
350 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class killer : MonoBehaviour
{
private void OnTriggerEnter(Collider other) {
if(other.tag == "Player" || other.tag == "Ennemy") {
Killable killable = other.gameObject.GetComponent<Killable>();
killable.die();
}
}
}