示例#1
0
 private void FixedUpdate()
 {
     if (isPlayBtnClick)
     {
         UserCount1.GetComponent <Text>().text = usercount1;
         UserCount2.GetComponent <Text>().text = usercount2;
         isPlayBtnClick = false;
     }
     if (length > 0)
     {
         for (int i = 0; i < 5; i++)
         {
             UserCharacter[i].GetComponent <Image>().color = new Color(255, 255, 255, 0);
             UserName[i].GetComponent <Text>().color       = new Color(0, 0, 0, 0);
         }
         for (int i = 0; i < length; i++)
         {
             UserCharacter[i].sprite = sprites[input_userCharacter[i]];
             UserCharacter[i].color  = new Color(255, 255, 255, 255);
             UserName[i].text        = input_userName[i];
             UserName[i].color       = new Color(0, 0, 0, 255);
         }
         length = 0;
     }
     if (length2 > 0)
     {
         for (int i = 0; i < 5; i++)
         {
             UserPannel[i].GetComponent <Image>().color = new Color(255, 255, 255, 255);
         }
         for (int i = 0; i < length2; i++)
         {
             if (UserReadycount[i])
             {
                 UserPannel[i].GetComponent <Image>().color = new Color(0, 255, 0, 255);
             }
             else
             {
                 UserPannel[i].GetComponent <Image>().color = new Color(255, 255, 255, 255);
             }
         }
         StartCount.GetComponent <Text>().text = "Ready\n" + ReadyCount + "/5";
         length2 = 0;
     }
     if (GameStart)
     {
         GameStart = false;
         SceneManager.LoadScene("LoadingScene");
     }
 }