public void RespondToInteraction(GameObject player) { // Debug.Log("Respond to interaction"); // Can only interact with on spirit at a time if (spiritQuestionDisplay.isFading) { return; } if (dayCycleController.GetTimeOfDay() < 12f) { List <string> easyQuestions = GetEasyQuestions(); int i = Random.Range(0, easyQuestions.Count); managePlayerData.ReceivePrompt(easyQuestions[i]); spiritQuestionDisplay.textMesh.text = easyQuestions[i]; } else { List <string> hardQuestions = GetHardQuestions(); int i = Random.Range(0, hardQuestions.Count); managePlayerData.ReceivePrompt(hardQuestions[i]); spiritQuestionDisplay.textMesh.text = hardQuestions[i]; } // TODO: Change based off text size //spiritQuestionDisplay.SetImageRectTransform(spiritQuestionDisplay.textMesh.GetRenderedValues(true)); spiritQuestionDisplay.SetQuestionComponentActive(2f); // TODO: let server know player found spirit! StartCoroutine(RemoveSpiritAndUIAfterTime()); }
void Update() { if (Input.GetKeyDown("t")) { managePlayerData.ReceivePrompt(Random.Range(0, 10).ToString()); } if (Input.GetKeyDown("c")) { managePlayerData.wipeData(); } }