| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- 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<ScrollViewScript>().GetUnlockedQuestionCount();
- unlockedQuestionsText.text = String.Format(
- LocalizationManager.Instance.GetText(
- unlockedQuestionsText.GetComponent<TextLocalization>().key),
- unlockedQuestionCount);
- }
- private void UpdateLockedQuestionsText() {
- ScrollViewScript scrollViewScript = scrollView.GetComponent<ScrollViewScript>();
- int lockedQuestionsCount = scrollViewScript.GetQuestionIdsInAnswerLine().Count - scrollViewScript.GetUnlockedQuestionCount();
- lockedQuestionsText.text = String.Format(
- LocalizationManager.Instance.GetText(
- lockedQuestionsText.GetComponent<TextLocalization>().key),
- lockedQuestionsCount);
- }
- private void ShoeNextPlayerAnswerLine()
- {
- throw new NotImplementedException();
- }
- private void ShowPrevPlayerAnswerLine()
- {
- throw new NotImplementedException();
- }
- }
|