void SetInterfaceType(PlayerMovementInterface moveType, PlayerRotationInterface rotationType, PlayerCatchReleaseInterface catchType, PlayerPauseInterface pauseType) { movementInterface = moveType; rotationInterface = rotationType; catchInterface = catchType; pauseInterface = pauseType; }
// Use this for initialization void Start() { player2CatchScript = player2CatchBox.GetComponent <CatchScript>(); rotationInterface = new PlayerRotationType1(); rotationInterface.IdentifyPlayer(player2CatchBox); player1Reference = GameObject.FindGameObjectWithTag("Player1").transform; }
public void ChangeInputDevice() { inputDevice = selectorObject.GetComponent <SelectIndexScript>().GetIndex(); SetDefaultControls(); ChangeInputDisplay(); SetControllerLabelText(); if (inputDevice == 0) { rotationInterface = new PlayerRotationType2(); } else { rotationInterface = new PlayerRotationType1(); } rotationInterface.IdentifyPlayer(playerRotationTransform); }