mirror of
https://github.com/ConjureETS/GameOff2024.git
synced 2026-03-24 05:00:59 +00:00
30 lines
733 B
C#
30 lines
733 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using GameOff.Core;
|
|
using GameOff.Quiz;
|
|
using UnityEngine;
|
|
|
|
namespace GameOff.UI.Quiz
|
|
{
|
|
public class QuestionHolderUI: MonoBehaviour
|
|
{
|
|
[SerializeField] private QuestionUI questionPrefab;
|
|
|
|
private void Start()
|
|
{
|
|
InitQuestion();
|
|
}
|
|
|
|
private void InitQuestion()
|
|
{
|
|
List<QuestionInfo> infos = QuizHandler.Instance.QuestionInfos;
|
|
|
|
for (int i = 1; i <= infos.Count; i++)
|
|
{
|
|
QuestionUI visual = Instantiate(questionPrefab, transform);
|
|
visual.SetUp(infos[i - 1]);
|
|
visual.transform.name = $"Question-{i}";
|
|
}
|
|
}
|
|
}
|
|
} |