示例#1
0
 private void Update()
 {
     if (_view.IsMine())
     {
         if (Input.GetKeyDown(KeyCode.Space))
         {
             var scale = new Vector3(2, 2, 2);
             _actorScaleRpc.ToOthers(DeliveryMethod.ReliableOrdered).OnSetScale(scale);
             OnSetScale(scale);
         }
     }
 }
示例#2
0
 private void Update()
 {
     if (_view.IsMine())
     {
         var moveDelta = MoveVelocity * Time.deltaTime;
         _moveController.Move(moveDelta);
     }
     else
     {
         _netPosition.Update(Time.deltaTime);
         _moveController.Move(_netPosition - transform.position);
     }
 }