using UnityEngine; public class EnemyDepositStation : MonoBehaviour { private void OnTriggerEnter(Collider other) { TeamMember teamMember = other.GetComponent(); if (teamMember == null) return; if (teamMember.CurrentTeam == TeamMember.Team.PlayerTeam) return; CashManager cash = other.GetComponent(); if (cash == null || cash.currentCash <= 0) return; SimpleTeamAI ai = other.GetComponent(); if (ai != null) { ai.StartDepositEffect(); ai.StartDeposit(15f); } } }