void SetIndicators() { if (FrameRate != null) { FrameRate.text = "Framerate: " + (Mathf.Round(1f / Time.deltaTime)); } if (BufferStatusIn != null && BufferStatusOut != null && NetworkHandler.Instance != null) { BufferStatusIn.SetActive(NetworkHandler.Instance.Connected); BufferStatusOut.SetActive(NetworkHandler.Instance.Connected); switch (AssitantDirector.BufferStatusIn) { case 0: BufferStatusIn.GetComponent <Image>().color = Color.grey; break; case 1: BufferStatusIn.GetComponent <Image>().color = Color.green; break; default: BufferStatusIn.GetComponent <Image>().color = Color.blue; break; } switch (AssitantDirector.BufferStatusOut) { case 0: BufferStatusOut.GetComponent <Image>().color = Color.grey; break; case 1: BufferStatusOut.GetComponent <Image>().color = Color.green; break; default: BufferStatusOut.GetComponent <Image>().color = Color.blue; break; } } }
void SetNetworkIndicators() { if (BufferStatusIn == null || BufferStatusOut == null) { return; } BufferStatusIn.SetActive(WasConnected); BufferStatusOut.SetActive(WasConnected); switch (AssitantDirector.BufferStatusIn) { case 0: BufferStatusIn.GetComponent <Image>().color = Color.grey; break; case 1: case 2: BufferStatusIn.GetComponent <Image>().color = Color.green; break; default: BufferStatusIn.GetComponent <Image>().color = Color.cyan; break; } switch (AssitantDirector.BufferStatusOut) { case 0: BufferStatusOut.GetComponent <Image>().color = Color.grey; break; case 1: case 2: BufferStatusOut.GetComponent <Image>().color = Color.green; break; default: BufferStatusOut.GetComponent <Image>().color = Color.cyan; break; } }