14 lines
350 B
C#
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();
|
|
}
|
|
}
|
|
}
|