private void InitPlayerPaddle(PaddleController playerPaddle) { // This will provide an offset from the left side var leftPlayerOffset = Vector3.right * playerPaddle.transform.localScale.x; var centerLeftPosition = new Vector3(this._bottomLeftCornerPosition.x, 0, 0); var settings = new PaddleInitializationSettings("AiPaddleInput", centerLeftPosition, leftPlayerOffset, this._worldBoundaries); playerPaddle.InitializePaddle(settings); }
private void InitAiPaddle(PaddleController aiPaddle) { // This will provide an offset from the right side var aiPlayerOffset = Vector3.right * -aiPaddle.transform.localScale.x; var centerRightPosition = new Vector3(this._topRightCornerPosition.x, 0, 0); var settings = new PaddleInitializationSettings("PlayerPaddleInput", centerRightPosition, aiPlayerOffset, this._worldBoundaries); aiPaddle.InitializePaddle(settings); }