using System.Collections; using System.Collections.Generic; using UnityEngine; public class EnemyDetectorManager : MonoBehaviour { public void OnEnemyDetected(EnemyDetector.PointEntree pe) { PopupUI popup = GameObject.FindGameObjectWithTag("Popup").GetComponent(); switch (pe) { case EnemyDetector.PointEntree.MurGauche: popup.SetPopup("Ennemis au mur gauche!", true); break; case EnemyDetector.PointEntree.MurDroit: popup.SetPopup("Ennemis au mur droit!", true); break; } } }