Exemplo n.º 1
0
 /// <summary>
 /// Displays an error message for the player about the username alreaby been taken
 /// </summary>
 /// <param name="name">The username that the player tried changing to</param>
 public void DisplayUsernameError(string name)
 {
     //Activate the error msg and make it wanish after a certain amount of time
     m_nameInputfield.gameObject.SetActive(false);
     m_nameErrorMsgText.gameObject.SetActive(true);
     m_nameErrorMsgText.text = string.Format("Name {0} is already taken...", name);
     CoroutineUtilities.DelaySeconds(() => { m_nameErrorMsgText.gameObject.SetActive(false); }, 2.5f);
 }
Exemplo n.º 2
0
 private void OnEnable()
 {
     //By degfualt make the next and previus not interactuable
     m_prevButton.interactable = false;
     m_nextButton.interactable = false;
     //Destroy all previous server entries game objects
     foreach (Transform t in m_ServerListLivingObject)
     {
         Destroy(t.gameObject);
     }
     //Start to search for a server after a delay
     StartCoroutine(CoroutineUtilities.DelaySeconds(() => { RefreshMachesList(); }, .2f));
 }