Exemplo n.º 1
0
 private void RightButtonClick()
 {
     if (TextContent.GetComponent <Text>().color == Color.white)
     {
         SceneManager.LoadScene("night");
     }
     ChangeColor.GetComponent <Image>().color       = Color.black;
     TextContent.GetComponent <Text>().color        = Color.white;
     ButtonNo.GetComponentInChildren <Text>().text  = "要不要看月亮";
     ButtonYes.GetComponentInChildren <Text>().text = "右轉";
     TextContent.GetComponent <Text>().text         = "左轉白天,右轉月亮";
 }
Exemplo n.º 2
0
 private void LeftButtonClick()
 {
     if (TextContent.GetComponent <Text>().color == Color.black)
     {
         SceneManager.LoadScene("morning");
     }
     //SceneManager.LoadScene("scene2");
     ChangeColor.GetComponent <Image>().color       = Color.white;
     TextContent.GetComponent <Text>().color        = Color.black;
     ButtonYes.GetComponentInChildren <Text>().text = "要不要看太陽";
     ButtonNo.GetComponentInChildren <Text>().text  = "左轉";
     TextContent.GetComponent <Text>().text         = "左轉太陽,右轉黑夜";
 }