private void Awake() { PlayerPaddle = PlayerPaddle ? PlayerPaddle : FindObjectOfType <PlayerPaddleMono>(); PlayerBallContainer = PlayerBallContainer ? PlayerBallContainer : PlayerPaddle.transform.parent; _myTransform = transform; _allRangesSum = _bonuseWithDropRate.Sum(x => x.ChanceValue); this.WeakSubscribe <BonusManagerMono, BrickWasDestroyedEventParams>(x => x.OnBrickDestroyed); }
private void Awake() { _dispatcher = DependencyResolver.GetCachedDispatcher(); _mainPadStartPosition = _startingPadPosition.position; _secondPadStartPosition = _mainPadStartPosition; _secondPadStartPosition.y *= -1f; _playerSecondPad = Instantiate(_playerPadPrefab, _startingPadPosition); _playerSecondPad.transform.Rotate(0, 0, 180); _playerSecondPad.ControllerParameters.CopyPrivateParams(_playerMainPad.ControllerParameters); _playerSecondPad.CopyInput(_playerMainPad); }
public void CopyInput(PlayerPaddleMono otherPaddle) { _paddleInput = otherPaddle._paddleInput; }