﻿using Assets.Scripts.Core.InternalControllers;
using UnityEngine;
using UnityEngine.UI;

public class ResultPanelShowing : MonoBehaviour
{

    public Text TextViewResultScore;
    public Text TextViewNewRecordTitle;
    public Button ButtonNoAds;

    public void Start()
    {

    }

    public void Update()
    {

    }

    public void ShowResultPanel(int score, bool record = false)
    {
        TextViewResultScore.text = "" + score;
        if (record)
        {
            TextViewNewRecordTitle.enabled = true;
        }
        else
        {
            TextViewNewRecordTitle.enabled = false;
        }
        if (!PrefabController.GetNoAdsItem())
        {
            ButtonNoAds.gameObject.SetActive(false);
        }
        else
        {
            ButtonNoAds.gameObject.SetActive(true);
        }
    }
    
}
