void OnTriggerStay(Collider other) { if (other.name.Equals("Jumba")) { if (stateControl.getCurrentState() != PlayerState.Dead && stateControl.getCurrentState() != PlayerState.DeadFloor) { if (!special.getJumbaSpecial()) { life.RemoveLifePlayer(damage); } } } }
public void AddHitCombo() { //Contador do hit recebe + this.countHit++; //Contador do hit camera if (!this.targetFocus) { this.countAnimationEffectCam++; } /* * Caso Counthit for igual a 2 * zero a variavel e adiciono um combo hit do jogador * */ if (this.countHit == 2) { if (this.hitComboText <= 100) { this.hitComboText++; this.countExtraAttack++; } this.countHit = 0; } #region CONTROLE DISPLEY FOCO /* contador da animaçao for maior ou igual a 16 verifica se pode tocar a animaçao, * se sim, dispara animaçao da camera * */ if (this.countAnimationEffectCam >= 10) { if (!this.targetFocus) { this.targetFocus = Instantiate(focusPrefab, focusPrefab.transform.position, Quaternion.identity) as GameObject; this.targetFocus.transform.parent = GameObject.Find("Main Camera").transform; this.targetFocus.transform.localPosition = focusPrefab.transform.position; this.targetFocus.name = "focus"; this.countAnimationEffectCam = 0; } } #endregion /* * Verifica se a barra esta menor que 100% se estiver add hitcombo * */ if (!controllerSpecial.getJumbaSpecial()) { if (this.hitCombo <= 100) { this.hitCombo += 2; interfaceJumba.HitBar(this.hitCombo); } if (this.hitCombo >= 100) { this.hitCombo = 0; controllerSpecial.setActiveInstanteParticle(true); // seta true na variavel para instanciar a particula do especial controllerSpecial.setJumbaSpecial(true); // Especial esta ativa } } }