コード例 #1
0
 void Start()
 {
     NavAgente          = this.GetComponent <NavMeshAgent>();
     Jogador            = GameObject.Find("Jogador").gameObject;
     tempCombateInimigo = this.GetComponent <CombateInimigo>();
     thisCollider       = this.GetComponent <CapsuleCollider>();
     tempInfoJogador    = Jogador.GetComponent <InfoJogador>();
     tempCombateJogador = Jogador.GetComponent <CombateJogador>();
     InvokeRepeating("InimigoAtacando", 0, 1);
     AnimInimigo     = this.gameObject.transform.GetChild(0).gameObject.GetComponent <Animator>();
     AgroExterno     = this.gameObject.transform.parent.gameObject;
     tempAgroExterno = this.gameObject.GetComponentInParent <AgroExterno>();
     Waypoint        = Instantiate(Prefab_Waypoint, new Vector3(this.transform.position.x, 0, this.transform.position.z + 2), Quaternion.identity);
 }
コード例 #2
0
    //Info Jogador



    void Start()
    {
        _InfoJogador = this.GetComponent <InfoJogador>();
        InvokeRepeating("AtaqueJogador", 0, _InfoJogador.Reflexo);
        tempMovJog = this.GetComponent <MovimentacaoJogador>();
    }