Пример #1
0
 public void OnAttack(InputAction.CallbackContext context)
 {
     if (IsLocalPlayer)
     {
         Logger.Log("10");
     }
 }
Пример #2
0
 public void OnMove(InputAction.CallbackContext context)
 {
     if (IsLocalPlayer)
     {
         Vector2 input = context.ReadValue <Vector2>();
         Vector3 move  = new Vector3(input.x, 0, input.y);
         Logger.Log($"move{input}");
         _rigidbody.velocity = move * speed;
     }
 }