PlayerManager.SpendCurrency()

public static float Player.PlayerManager.SpendCurrency(int Pcurrency)

CyberPsychosis    >    Player    >    PlayerManager    >    SpendCurrency

Summary

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);
    }
}