Ejemplo n.º 1
0
    private void Start()
    {
        team  = this.transform.root.GetComponent <TeamScript>().team;
        agent = this.gameObject.GetComponent <NavMeshAgent>();

        stats = this.GetComponent <Unit_Statistics>();
    }
Ejemplo n.º 2
0
    private void Awake()
    {
        gm = GameObject.FindGameObjectWithTag("GameManager").GetComponent <GameManager>();
        tm = gm.GetComponentInChildren <TeamManager>();

        life     = this.GetComponent <Unit_Life>();
        stats    = this.gameObject.GetComponent <Unit_Statistics>();
        attack   = this.gameObject.GetComponent <Unit_Attack>();
        movement = this.gameObject.GetComponent <Unit_Movement>();
    }