Beispiel #1
0
    void DamageMessage()
    {
        defender.damageActionEnd = false;

        int    attack       = attacker.Attack();
        int    deffence     = defender.Defence();
        string defenderName = defender.CharacterName();

        damage       = Mathf.Abs(deffence - attack);
        defender.hp -= damage;

        if (currentTurn == CURRENT_TURN.MONSTER)
        {
            playerAction.playerInfo.statusInfo.hp = defender.hp;
        }

        string damageMessage = string.Format("{0}は{1}hpのダメージを受けた", defenderName, damage);

        StartCoroutine(BattleMenu.LetterDisplay(damageMessage));

        battleProcess = BATTLE_PROCESS.ATTACK_RESULT;
    }