public void Start() { this.raycastEnemy = GetComponent <RaycastEnemy>(); this.myTransform = gameObject.transform; this.canAttack = GetComponent <EnemyCanAttack>(); this.enemyStateMachine = GetComponent <EnemyStateMachine>(); this.enemyStateMachine.setStateMachineEnemy(StateMachineEnemy.Move); this.target = GameObject.Find("Jumba").transform; this.controllerHitSequence = target.GetComponent <ControllerHitSequence>(); this.interfaceHitCombo = target.GetComponent <InterfaceHitCombo>(); this.controllerHit = target.GetComponent <ControllerHitPlayer>(); this.strikeForce = target.GetComponent <StrikeForce>(); this.enemyLife = GetComponent <EnemyLife>(); this.characterController = GetComponent <CharacterController>(); this.enemyAnimation = GetComponent <EnemyAnimator>(); }
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 OnTriggerEnter(Collider other) { if (other.tag.Equals("AttackJumba")) { if (enemyStateMachine.getStateMachineEnemy() == StateMachineEnemy.Catch) { this.controllerHitSequence.setCollisionEnemy(true); this.controllerHit.AddHitCombo(); this.interfaceHitCombo.AddHitAnimation(); enemyLife.RemoveLife(StrikeForce.checkStrikeForce().getPowerAttack()); this.enemyAnimation.receiveAttack(); GameObject.Find("EnemyLife").GetComponent <InterfaceLifeBoss>().checkLifeBar(enemyLife.life); } } }
void OnTriggerEnter(Collider other) { if (other.tag.Equals("AttackJumba")) { if (life.life.getLife() >= 0) { Director.sharedDirector().playEffect(strike); this.controllerHitSequence.setCollisionEnemy(true); this.controllerHit.AddHitCombo(); this.interfaceHitCombo.AddHitAnimation(); life.removeLife(StrikeForce.checkStrikeForce().getPowerAttack()); GameObject.Find("EnemyLife").GetComponent <InterfaceLifeBoss>().checkLifeBar(life.life.getLife()); } } }
void Start() { this.strikeForce = GetComponent <StrikeForce>(); gettingAttack = GameObject.Find("Jumba").GetComponent <GettingAttacks>(); }