Exemple #1
0
 // Start is called before the first frame update
 void Start()
 {
     jogador = GameObject.FindWithTag("Jogador");
     this.spawnZumbi();
     movimento         = GetComponent <MovimentoBehaviour>();
     animacao          = GetComponent <AnimacaoBehaviour>();
     status            = GetComponent <Status>();
     controlaInterface = GameObject.FindObjectOfType(typeof(ControlaInterface)) as ControlaInterface;
 }
Exemple #2
0
 private void Start()
 {
     jogador             = GameObject.FindWithTag("Jogador").transform;
     agente              = GetComponent <NavMeshAgent>();
     status              = GetComponent <Status>();
     animacao            = GetComponent <AnimacaoBehaviour>();
     movimento           = GetComponent <MovimentoBehaviour>();
     agente.speed        = status.velocidade;
     sliderVida.maxValue = status.vidaInicial;
     this.atualizarInterface();
 }