Esempio n. 1
0
 private void Awake()
 {
     if (_instance != null && _instance != this)
     {
         Destroy(this.gameObject);
     }
     else
     {
         _instance = this;
     }
 }
Esempio n. 2
0
    public void SetOwnerAgent(CombatAgent agent_)
    {
        agent = agent_;

        if (agent_.tag == "agent")
        {
            targetTag = "enermy";

            SetColor(Color.blue);
        }
        else
        {
            targetTag = "agent";
            SetColor(Color.red);
        }
    }
Esempio n. 3
0
 public void OnDisable()
 {
     agent = null;
 }