fix: c'est pas logique de mettre enable avant start bordel
This commit is contained in:
parent
7ab0ae9ac8
commit
b3843ab76c
@ -14,9 +14,8 @@ public class QuestionHandler : MonoBehaviour
|
|||||||
|
|
||||||
void OnEnable()
|
void OnEnable()
|
||||||
{
|
{
|
||||||
|
gameManager = managers.GetComponent<GameManager>();
|
||||||
player2questions = gameManager.myRoom.GetQuestionsByPlayer(gameManager.currentPlayer);
|
player2questions = gameManager.myRoom.GetQuestionsByPlayer(gameManager.currentPlayer);
|
||||||
Debug.Log(currentQuestion);
|
|
||||||
Debug.Log(JsonUtility.ToJson(player2questions));
|
|
||||||
Redraw(currentQuestion);
|
Redraw(currentQuestion);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -29,7 +28,6 @@ void OnDisable()
|
|||||||
void Redraw(int currentQuestion)
|
void Redraw(int currentQuestion)
|
||||||
{
|
{
|
||||||
Prompt prompt = promptList.prompts.Find(x => x.id == player2questions[currentQuestion - 1].promptId);
|
Prompt prompt = promptList.prompts.Find(x => x.id == player2questions[currentQuestion - 1].promptId);
|
||||||
Debug.Log(JsonUtility.ToJson(prompt));
|
|
||||||
explainText.SetText(prompt.en);
|
explainText.SetText(prompt.en);
|
||||||
|
|
||||||
CameraManager cameraManager = gameObject.GetComponent<CameraManager>();
|
CameraManager cameraManager = gameObject.GetComponent<CameraManager>();
|
||||||
@ -61,7 +59,7 @@ public void OnSubmitButton()
|
|||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
gameManager = managers.GetComponent<GameManager>();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update is called once per frame
|
// Update is called once per frame
|
||||||
|
Loading…
Reference in New Issue
Block a user