private void causarDano(ControllerLife alvoAtingido) { if (this.atacando) { this.calcularDanoTotal(); alvoAtingido.receberDano(this.danoTotal); } }
// Use this for initialization void Start() { this.inimigo = GetComponentInParent <ControllerLife>(); this.HPTotal = this.inimigo.getVidaTotal(); this.player = GameObject.FindGameObjectWithTag("Player"); this.HPMesh = GetComponentInChildren <TextMesh>(); SpriteRenderer[] r = GetComponentsInChildren <SpriteRenderer>(); this.vida = r[0]; this.background = r[1]; this.hpAnterior = this.inimigo.getVidaAtual(); this.hide(); Debug.Log("start hp inimigo"); }
// Use this for initialization void Start() { forward = Camera.main.transform.forward; forward.y = 0; forward = Vector3.Normalize(forward); right = Quaternion.Euler(new Vector3(0, 90, 0)) * forward; this.controllerLife = GetComponent <ControllerLife>(); Status [] sts = GetComponents <Status>(); Status stBase = sts[0]; Status stBonus = sts[1]; this.controllerLife.inicializar(stBase, stBonus); }
// Use this for initialization void Start() { this.player = GameObject.FindGameObjectWithTag("Player").transform; this.nav = GetComponent <NavMeshAgent> (); Status stBase = GetComponent <Status>(); this.controllerLife = GetComponent <ControllerLife>(); this.controllerLife.inicializar(stBase); this.controllerLife.setEstadoAtual(Enumerates.estadoDeVida.Vivo); this.posInicial = new Vector3((float)Math.Round(transform.position.x, 1), 0, (float)Math.Round(transform.position.z, 1)); this.arma = GetComponentInChildren <Arma>(); Debug.Log(this.posInicial); this.visao = GetComponentInChildren <VisaoSimples>(); this.selectFollowMode(); this.selecionarModoDePatrulhar(); Debug.Log("start"); }
// Use this for initialization void Start() { this.player = GameObject.FindGameObjectWithTag("Player").GetComponent <ControllerLife>(); this.HPTotal = this.player.getVidaTotal(); }
// Use this for initialization void Start() { this.portadorController = GetComponentInParent <ControllerLife>(); }