void OnTriggerEnter(Collider other) { if (other.tag.Equals("AttackJumba")) { if (life.getCurrentLife() >= 0) { this.controllerHitSequence.setCollisionEnemy(true); this.controllerHit.AddHitCombo(); this.interfaceHitCombo.AddHitAnimation(); // Remove uma quantidade de vida equivalente //this.enemyAnimation.receiveAttack(); life.removeLife(StrikeForce.checkStrikeForce().getPowerAttack()); GameObject.Find("EnemyLife").GetComponent <InterfaceLifeBoss>().checkLifeBar(life.getCurrentLife()); } else { SwordBoss sword = GetComponent <SwordBoss>(); sword.IsAnimation = true; sword.setStateSwordBoss(stateSwordBoss.DEAD); Destroy(GetComponent <ColliderDamage>()); } } }
void Start() { this.anim = GetComponent <Animator>(); this.componenteBoss = this.transform.parent.GetComponent <SwordBoss>(); }
void Start() { this.currentLife = this.life; this.swordBoss = GetComponent <SwordBoss>(); }