using UnityEngine;
using Wizard;

public class ColosseumHeadLine : MonoBehaviour
{
	[SerializeField]
	private UILabel _ticketNum;

	[SerializeField]
	private UILabel _ticketCost;

	[SerializeField]
	private UILabel _rupyNum;

	[SerializeField]
	private UILabel _rupyCost;

	[SerializeField]
	private UILabel _crystalNum;

	[SerializeField]
	private UILabel _crystalCost;

	private void OnEnable()
	{
		UpdateHeadLine();
	}

	public void UpdateHeadLine()
	{
		int ticketCost = Data.ArenaData.ColosseumData.ticketCost;
		int rupyCost = Data.ArenaData.ColosseumData.rupyCost;
		int crystalCost = Data.ArenaData.ColosseumData.crystalCost;
		SystemText systemText = Data.SystemText;
		if (_ticketNum != null)
		{
			_ticketNum.text = PlayerStaticData.UserColosseumTicketNum.ToString();
			_ticketCost.text = systemText.Get("Arena_0045", ticketCost.ToString());
		}
		if (_rupyNum != null)
		{
			_rupyNum.text = PlayerStaticData.UserRupyCount.ToString();
			_rupyCost.text = systemText.Get("Arena_0047", rupyCost.ToString());
		}
		if (_crystalNum != null)
		{
			_crystalNum.text = PlayerStaticData.UserCrystalCount.ToString();
			_crystalCost.text = systemText.Get("Arena_0046", crystalCost.ToString());
		}
	}
}
