47 lines
951 B
C#
47 lines
951 B
C#
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class TournamentRewardPopUpItem : MonoBehaviour
|
|
{
|
|
public Text tournamentNameText;
|
|
|
|
public Text positionText;
|
|
|
|
public Text cashText;
|
|
|
|
public Text rankingpointsText;
|
|
|
|
public int position;
|
|
|
|
public int cash;
|
|
|
|
public int rankingPoints;
|
|
|
|
public string tournamentName = "";
|
|
|
|
private void Start()
|
|
{
|
|
int num = position + 1;
|
|
cashText.text = cash.ToString();
|
|
rankingpointsText.text = rankingPoints.ToString();
|
|
positionText.text = num.ToString();
|
|
tournamentNameText.text = tournamentName;
|
|
}
|
|
|
|
private void Update()
|
|
{
|
|
}
|
|
|
|
public void CollectButton()
|
|
{
|
|
if (position == 0)
|
|
{
|
|
Singleton<SaveDataManager>.Instance.GetCurrentPlayerData().PlayerTournamentsWon++;
|
|
}
|
|
GameManager.Instance._playerData.AddSubPlayerCashValue(cash);
|
|
GameManager.Instance._playerData.AddSubPlayerRankingPoints(rankingPoints);
|
|
GameManager.Instance.PlayOnClickSound();
|
|
Object.Destroy(base.gameObject);
|
|
}
|
|
}
|