protected void CustomUpdate() { if (!sendManualy && UDPConnectionManager.ConectedToServer() && !firstTimeInConnection) { packet.SetManualyIncresedIndex(false); SendMessage(); } }
public void SendMultipleMessages(bool value) { if (scriptEnabled && UDPConnectionManager.ConectedToServer()) { this.value = value; Thread thread = new Thread(() => SendMessage()); thread.Name = "Object State"; thread.Start(); } }
// Update is called once per frame protected void FixedUpdate() { if (UDPConnectionManager.ConectedToServer() && firstTimeInConnection) { packet = new Packet(prefix); firstTimeInConnection = false; if (senderId != -1) { packet.SetSenderId(senderId); } } //if (!sendManualy && UDPConnectionManager.ConectedToServer() && !firstTimeInConnection) //{ // SendMessage(); //} }
public void SendBoolean(bool value) { if (scriptEnabled) { try { this.value = value; if (sendManualy && UDPConnectionManager.ConectedToServer()) { SendMessage(); } //Debug.Log(msg); } catch (System.Exception ex) { Debug.Log(ex.Message); } } }
public void SendFloat(float value) { if (this.enabled) { try { this.value = value; if (sendManualy && UDPConnectionManager.ConectedToServer()) { SendMessage(); } //await connection.InvokeAsync("Send", connection.GetHashCode().ToString(), msg); //Debug.Log(msg); } catch (System.Exception ex) { Debug.Log(ex.Message); } } }