using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class PlayerCoinsUI : MonoBehaviour {

    [SerializeField] Player player;
    [SerializeField] Text text;

    public void OnEnable() {
        player.OnCoinE.AddListener(OnCoinUpdate);
    }

    public void OnCoinUpdate() {
        text.text = player.coins.ToString();
    }
}
