public void _wm_spawnNoAnswerQuestion() { Vector3 playerPos = player.transform.position; playerPos.y = 2.5f; GameObject newNAQGO = (GameObject)Instantiate(noAnswerQuestionPrefab, playerPos + new Vector3(-1, 0.3f, -1.3f), Quaternion.Euler(50.0f, 0, 0)); NoAnswerQuestion newNAQ = newNAQGO.GetComponent <NoAnswerQuestion> (); string nextStr = bank.getNextStringId(); nextStr = rosetta.retrieveString(nextStr); newNAQ.transform.localScale = 0.2f * Vector2.one; newNAQ.initialize(); newNAQ.setText(nextStr); newNAQ.setAutoTransitionOut(3.0f + nextStr.Length * 0.05f); newNAQ.transitionIn(); floater [questionNumber++].GetComponent <MeshRenderer> ().enabled = false; }
public void _wm_spawnNoAnswerQuestion(int dropNum) { level.storeBoolValue("PickedUpDroplet" + dropNum, true); ++usedQuestions; int drplt = level.retrieveIntValue("Droplets"); level.storeIntValue("Droplets", drplt + 1); dropletAlive[dropNum - 1] = false; Vector3 playerPos = level.player.transform.position; playerPos.y += 2.5f; GameObject newNAQGO = (GameObject)Instantiate(noAnswerQuestionPrefab, playerPos + new Vector3(-1, 0.3f, -1.3f), Quaternion.Euler(50.0f, 0, 0)); NoAnswerQuestion newNAQ = newNAQGO.GetComponent <NoAnswerQuestion> (); string nextStr = currentStringBank.getStringId(drplt); nextStr = level.rosetta.retrieveString(nextStr); newNAQ.initialize(); newNAQ.transform.localScale = 0.2f * Vector2.one; newNAQ.setText(StringUtils.chopLines(nextStr, 25)); newNAQ.setAutoTransitionOut(3.0f + nextStr.Length * 0.05f); newNAQ.transitionIn(); if (usedQuestions == actualNumberOfDroplets) { level.storeBoolValue(whirlpoolName, true); //if (level.retrieveBoolValue ("HasAlphabet")) { wpool.enable(); //} } if (usedQuestions <= floater.Length) { floater [usedQuestions - 1].Break(); } }