18 lines
479 B
C#
18 lines
479 B
C#
|
|
using UnityEngine;
|
|||
|
|
|
|||
|
|
public class HealthPotion : MonoBehaviour
|
|||
|
|
{
|
|||
|
|
[Header("--- <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> ---")]
|
|||
|
|
[SerializeField] private float healAmount = 30f; // ȸ<><C8B8><EFBFBD><EFBFBD>
|
|||
|
|
|
|||
|
|
// PlayerInteraction<6F><6E><EFBFBD><EFBFBD> ȣ<><C8A3><EFBFBD><EFBFBD> <20>Լ<EFBFBD>
|
|||
|
|
public void Use(PlayerHealth target)
|
|||
|
|
{
|
|||
|
|
if (target == null) return;
|
|||
|
|
|
|||
|
|
target.Heal(healAmount); // <20>÷<EFBFBD><C3B7>̾<EFBFBD> ü<><C3BC> ȸ<><C8B8>
|
|||
|
|
Debug.Log($"<color=green>[Potion]</color> ü<><C3BC> {healAmount} ȸ<><C8B8>!");
|
|||
|
|
|
|||
|
|
Destroy(gameObject); // <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
|
}
|
|||
|
|
}
|