using UnityEngine; using Utility; namespace GameLogic.CombatScenesTool { public class CombatAlertManager : Singleton { public BetterList alertList = new BetterList(); public class AlertBuffer { public GameObject GameObject; public Collider realCollider; public CombatHeroEntity targetEntity; } public void AddAlert(GameObject gameObject, CombatHeroEntity targetEntity) { AlertBuffer alertBuffer = new AlertBuffer(); alertBuffer.GameObject = gameObject; alertBuffer.realCollider = gameObject.GetComponent(); alertBuffer.targetEntity = targetEntity; alertList.Add(alertBuffer); } public void RemoveAlert(GameObject gameObject) { for (int i = 0; i < alertList.Count; i++) { if (alertList[i].GameObject == gameObject) { alertList.RemoveAt(i); return; } } } } }