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