// Start is called before the first frame update void Start() { loginInfo = GameObject.FindGameObjectWithTag("Login").GetComponent <Script_Login>(); Player1Goal.gameObject.SetActive(false); Player2Goal.gameObject.SetActive(false); rigi = gameObject.GetComponent <Rigidbody>(); RandomDirection(); }
// Start is called before the first frame update void Start() { Script_Login login = GameObject.FindGameObjectWithTag("Login").GetComponent <Script_Login>(); if (welcomeNammeText) { welcomeNammeText.text = login.http.loginUser.user_id; } if (profileText) { profileText.text = "Rank: " + login.http.loginUser.rank + " Score: " + login.http.loginUser.score; } if (emailText) { emailText.text = login.http.loginUser.email; } }
void Start() { Debug.Log("Initialized."); loginInfo = GameObject.FindGameObjectWithTag("Login").GetComponent <Script_Login>(); if (loginInfo.serverIP.Length > 5) { if (loginInfo.serverIP == "localhost") { serverIP = "127.0.0.1"; } else { serverIP = loginInfo.serverIP; } } m_Driver = NetworkDriver.Create(); m_Connection = default(NetworkConnection); var endpoint = NetworkEndPoint.Parse(serverIP, serverPort); m_Connection = m_Driver.Connect(endpoint); }