void SendTransform() { //if (lastState.IsDifferent(thisTransform, accuracy)) { if (timeLastSending >= sendingPeriod) { lastState = NetworkTransform.FromTransform(thisTransform); NetworkManager.Instance.SendTransform(lastState); timeLastSending = 0; return; } //} timeLastSending += Time.deltaTime; }
void Start() { thisTransform = this.transform; lastState = NetworkTransform.FromTransform(thisTransform); }