viewers access
public static float Player.PlayerManager.SpendCurrency(int Pcurrency)
CyberPsychosis > Player > PlayerManager > SpendCurrency
Spends currency, reduces the currency by the input value
using UnityEngine;
using Player;
public class HealTradeTrigger : MonoBehaviour
{
public int currencyPrice = 30;
public int healAmount = 30;
void OnTriggerEnter(Collider other)
{
if(!other.CompareTag("Player"))
return;
PlayerManager.SpendCurrency(currencyPrice);
PlayerManager.Heal(healAmount);
}
}