using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class AnswerLineInfoScript : MonoBehaviour { [SerializeField] Button nextPlayerButton; [SerializeField] Button prevPlayerButton; [SerializeField] Text lockedQuestionsText; [SerializeField] Text unlockedQuestionsText; [SerializeField] GameObject scrollView; private void Start() { nextPlayerButton.onClick.AddListener(ShowPrevPlayerAnswerLine); prevPlayerButton.onClick.AddListener(ShoeNextPlayerAnswerLine); } private void Update() { UpdateLockedQuestionsText(); UpdateUnlockedQuestionsText(); } private void UpdateUnlockedQuestionsText() { int unlockedQuestionCount = scrollView.GetComponent().GetUnlockedQuestionCount(); unlockedQuestionsText.text = String.Format( LocalizationManager.Instance.GetText( unlockedQuestionsText.GetComponent().key), unlockedQuestionCount); } private void UpdateLockedQuestionsText() { ScrollViewScript scrollViewScript = scrollView.GetComponent(); int lockedQuestionsCount = scrollViewScript.GetQuestionIdsInAnswerLine().Count - scrollViewScript.GetUnlockedQuestionCount(); lockedQuestionsText.text = String.Format( LocalizationManager.Instance.GetText( lockedQuestionsText.GetComponent().key), lockedQuestionsCount); } private void ShoeNextPlayerAnswerLine() { throw new NotImplementedException(); } private void ShowPrevPlayerAnswerLine() { throw new NotImplementedException(); } }