Пример #1
0
    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>());
            }
        }
    }
Пример #2
0
    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);
            }
        }
    }
Пример #3
0
    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());
            }
        }
    }