Beispiel #1
0
	// create a sentence from the hardcoded list
	void CreateSentence(int i)
	{
		GameObject st = Instantiate(sentence, new Vector3(0f, 0f, 0f), Quaternion.identity) as GameObject;
		currentSentence = st.GetComponent<Sentence>();
		Challenge c = tests.Challenges [i];
		currentSentence.Setup(c.Phrases[GameStateManager.NativeLang], c.Answer.key, c.Animation);
		st.transform.SetParent(topBar);
		st.transform.localPosition = new Vector3(0f, -20f);


		//Starting the thinking bubble
		PlayerControl pc = GameObject.FindWithTag("Player").GetComponent<PlayerControl>();
		Vector3 vector = (Vector3)(GameObject.FindWithTag ("Player").transform.position + new Vector3 (0.25f,0.3f, 0));
		pc.thinking(c.Answer.key, vector);
	}