Esempio n. 1
0
 void StartArithmeticQuiz(int x)
 {
     for (int i = 0; i < x; i++)
     {
         int rand = Random.Range(0, foodController.grid.Count);
         //Vector2 pos = new Vector2 (ReturnRounded (Random.Range (-2.5f, 2.5f), data.moveDistance), ReturnRounded (Random.Range (-2.5f, 2f), data.moveDistance));
         Vector2 pos = foodController.grid[rand];
         foodController.grid.Remove(foodController.grid[rand]);
         GameObject temp2 = Instantiate(ArithmeticQuizCoin, pos, Quaternion.identity);
         temp2.GetComponent <FoodObject> ().pos = pos;
     }
     foodController.FillFoodList();
     SetArithmeticAnswers("add");
 }
Esempio n. 2
0
 public void SpawnTrigCoins(int x)
 {
     for (int i = 0; i < x; i++)
     {
         int rand = Random.Range(0, foodController.grid.Count);
         //Vector2 pos = new Vector2 (ReturnRounded (Random.Range (-2.5f, 2.5f), data.moveDistance), ReturnRounded (Random.Range (-2.5f, 2f), data.moveDistance));
         Vector2 pos = foodController.grid[rand];
         foodController.grid.Remove(foodController.grid[rand]);
         GameObject temp2 = Instantiate(TrigCoin, pos, Quaternion.identity);
         temp2.GetComponent <FoodObject> ().pos = pos;
     }
     if (!start)
     {
         foodController.FillFoodList();
         SetTrigQuestion();
         start = true;
     }
 }