コード例 #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 Start()
 {
     this.anim           = GetComponent <Animator>();
     this.componenteBoss = this.transform.parent.GetComponent <SwordBoss>();
 }
コード例 #3
0
    void Start()
    {
        this.currentLife = this.life;

        this.swordBoss = GetComponent <SwordBoss>();
    }