Esempio n. 1
0
 // Start is called before the first frame update
 void Start()
 {
     wbGameController = GameObject.Find("WordBlockGameController").GetComponent <WordBlockGameController>();
     rb2D             = GetComponent <Rigidbody2D>();
     if (wbGameController.questionsData[wbGameController.currentPlayingNum].content[1].Length <= 8)
     {
         forceValue = -95f;
     }
     else if (wbGameController.questionsData[wbGameController.currentPlayingNum].content[1].Length <= 13)
     {
         forceValue = -115f;
     }
     else
     {
         forceValue = -125f;
     }
     rb2D.AddForce(new Vector2(forceValue, 0));
 }
Esempio n. 2
0
 // Start is called before the first frame update
 void Start()
 {
     wbGameController = GameObject.Find("WordBlockGameController").GetComponent <WordBlockGameController>();
 }