protected virtual void OnMoveInput(MoveInputSignal data) { if (data.Arg1 != Index) { return; } Position = new Vector2(Mathf.Clamp(Position.x + data.Arg2 * data.Arg3, -1f + Length, 1f - Length), Position.y); SignalBus.Invoke(new PaddlePositionChangedSignal(this)); }
protected override void OnMoveInput(MoveInputSignal data) { if (!_pongMultiplayerManager.IsHost && Index == 0) { return; } base.OnMoveInput(data); if (data.Arg1 != Index) { return; } if (_pongMultiplayerManager.IsHost && Index == 1) { _networkGameManager.CallSyncPaddle(this); } }