Example #1
0
 /// <summary>
 /// Invoke join callback
 /// </summary>
 public void JoinRoom()
 {
     if (isLAN)
     {
         OxyniteNetworkManager.GetInstance().StartGame(ipAddress);
     }
     else
     {
         joinRoomCallback.Invoke(match);
     }
 }
Example #2
0
    /// <summary>
    /// Gets nickname or asks for new one
    /// </summary>
    void Start()
    {
        networkManager   = OxyniteNetworkManager.GetInstance();
        networkDiscovery = OxyniteNetworkDiscovery.GetInstance();

        networkManager.StartMatchMaker();
        RefreshRoomList();

        if (PlayerPrefs.HasKey("nickname"))
        {
            nicknamePanel.gameObject.SetActive(false);
            nicknameText.text = PlayerPrefs.GetString("nickname");
        }
        else
        {
            nicknamePanel.gameObject.SetActive(true);
        }
    }
Example #3
0
 void Start()
 {
     s_Instance       = this;
     networkDiscovery = OxyniteNetworkDiscovery.GetInstance();
 }