Ejemplo n.º 1
0
 /**Method Name: TestClick
  * Parameters: N/A
  * Returns: N/A
  *
  * This function flips boolean values and switches button colors to indicate selection.
  * Called by all test buttons.
  * */
 public void TestClick()
 {
     //check if in CT mode
     if (CTmode)
     {
         //Takes button clicked
         GameObject buttonClicked = ES.currentSelectedGameObject;
         //change color of button
         if (buttonClicked.GetComponent <Image>().color == Color.white)
         {
             buttonClicked.GetComponent <Image>().color = new Color(1, (float)0.95, (float)0.5);
         }
         else
         {
             buttonClicked.GetComponent <Image>().color = Color.white;
         }
         //buttons are named 1,2,3,...,n
         int testNumber = int.Parse(buttonClicked.name);
         //testNumber-1 for indexing
         temp[testNumber - 1] = !temp[testNumber - 1];
     }
     //this is for practice test
     else
     {
         Debug.Log("HEllo");
         Debug.Log(ES.currentSelectedGameObject.name);
         StartGame.ChangeToGameScene(int.Parse(ES.currentSelectedGameObject.name));
     }
 }
Ejemplo n.º 2
0
 private void Update()
 {
     if (StartGame.Practice())
     {
         if (Input.GetKeyDown(KeyCode.Escape))
         {
             StartGame.ChangeToGameScene(0);
         }
     }
 }
Ejemplo n.º 3
0
 public void TakeTest()
 {
     StartGame.ChangeToGameScene(chosen);
 }