示例#1
0
    //Enemy's Special Attack Functionality
    IEnumerator EnemySpecial(Unit unit, BattleHUD hud)
    {
        bool isDead = unit.TakeDamage(enemyUnit.specDamage);

        hud.HPFiddling(unit.currentHP);
        dialogueText.text = enemyUnit.unitName + " attacks " + unit.unitName + " for " + enemyUnit.specDamage + "!";
        yield return(new WaitForSeconds(2f));

        if (isDead)
        {
            deadCheck += 1;
        }
    }
示例#2
0
    //Runs during attack phase if partyMemOne selected basic attack
    IEnumerator PartyOneBasicAtk()
    {
        bool isDead = enemyUnit.TakeDamage(partyOneUnit.regDamage);

        enemyHUD.HPFiddling(enemyUnit.currentHP);
        dialogueText.text = partyOneUnit.unitName + " attacks for " + partyOneUnit.regDamage + "!";

        yield return(new WaitForSeconds(2f));

        if (isDead)
        {
            state = BattleState.WON;
            BattleEnd();
        }
        Debug.Log("Unit 1 B-ATK COMP");
    }