private void Awake() { if (_instance != null && _instance != this) { Destroy(this.gameObject); } else { _instance = this; } }
public void SetOwnerAgent(CombatAgent agent_) { agent = agent_; if (agent_.tag == "agent") { targetTag = "enermy"; SetColor(Color.blue); } else { targetTag = "agent"; SetColor(Color.red); } }
public void OnDisable() { agent = null; }