Esempio n. 1
0
 IEnumerator BallCalculating()
 {
     while (true)
     {
         if (touchController.GetDirection().y != 0)
         {
             direction = touchController.GetDirection();
         }
         if (touchController.GetGameObjectFromMouseDrag() == this.gameObject)
         {
             if (touchController.pointerUp)
             {
                 //Debug.Log(direction);
                 Moving(direction.y);
                 if (quizController)
                 {
                     //Debug.Log("Before Result");
                     //touchController.gameObject.SetActive(false);
                     //yield return new WaitForSeconds(quizController.waitTime);
                     yield return(quizController.CheckResult());
                     //Debug.Log("Updated Result");
                     //touchController.gameObject.SetActive(true);
                 }
             }
         }
         yield return(null);
     }
 }
Esempio n. 2
0
 // Update is called once per frame
 void Update()
 {
     if (touchController.GetGameObjectFromMouseDrag() == this.gameObject)
     {
         Reset();
         //direction = Vector2.zero;
     }
 }