Exemplo n.º 1
0
    public void DoEffect(CommandEffect commandEffect, PlayerCharacter target)
    {
        switch (commandEffect)
        {
        //回復効果
        case HealEffect healEffect:
            target.Recover(healEffect.healAmount);
            selectTargetWindow.Flash(target, new Color(0, 1, 0, 0.5f), 1f);
            break;

        //蘇生効果
        case ResuscitationEffect resuscitationEffect:
            if (target.status.hp >= 0)
            {
                return;
            }
            target.Recover(target.status.maxHp / resuscitationEffect.healRate);
            break;

        default:
            Debug.Log("not effect");
            break;
        }
        //ステータス更新
        characterWindow.UpdateShow();
        Debug.Log(target + commandEffect.ToString());
    }