Chataigne/Assets/Script/TriggerDog.cs
Djalim Simaila 36a2982a48 IMPORTATION_CODE
Code parralax des décors
Ajout et correction du code Hadès
2023-05-30 20:24:37 +02:00

18 lines
424 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class TriggerDog : MonoBehaviour
{
private void OnTriggerEnter2D(Collider2D collision)
{
if(collision.gameObject.CompareTag("Joueur"))
{
GameObject hades = GameObject.Find("HADES");
Ennemy e = hades.GetComponent<Ennemy>();
e.setAggro();
}
}
}