Files
netease-modsdk-wiki/docs/mcdocs/1-ModAPI/接口/控制.md
2025-03-17 13:24:39 +08:00

972 lines
25 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
sidebarDepth: 1
---
# 控制
# 索引
包括屏幕操作的相关接口
---
| 接口 | <div style="width: 3em"></div> | 描述 |
| --- | --- | --- |
| [AddPickBlacklist](控制.md#addpickblacklist) | <span style="display:inline;color:#7575f9">客户端</span> | 添加使用camera组件选取实体时的黑名单即该实体不会被选取到 |
| [ClearPickBlacklist](控制.md#clearpickblacklist) | <span style="display:inline;color:#7575f9">客户端</span> | 清除使用camera组件选取实体的黑名单 |
| [GetChosen](控制.md#getchosen) | <span style="display:inline;color:#7575f9">客户端</span> | 获取屏幕点击位置的实体或方块信息通常与GetEntityByCoordEvent配合使用 |
| [GetChosenEntity](控制.md#getchosenentity) | <span style="display:inline;color:#7575f9">客户端</span> | 获取屏幕点击位置的实体id通常与GetEntityByCoordEvent配合使用 |
| [GetHoldTimeThresholdInMs](控制.md#getholdtimethresholdinms) | <span style="display:inline;color:#7575f9">客户端</span> | 获取长按判定时间,即按着屏幕多长时间会触发长按操作 |
| [GetInputVector](控制.md#getinputvector) | <span style="display:inline;color:#7575f9">客户端</span> | 获取方向键(移动轮盘)的输入 |
| [GetTouchPos](控制.md#gettouchpos) | <span style="display:inline;color:#7575f9">客户端</span> | 获取点击的屏幕坐标。可以监听TapBeforeClientEvent或TapOrHoldReleaseClientEvent事件调用本API获取点击坐标。 |
| [LockInputVector](控制.md#lockinputvector) | <span style="display:inline;color:#7575f9">客户端</span> | 锁定本地玩家方向键(移动轮盘)的输入,可使本地玩家持续向指定方向前行,且不会再受玩家输入影响 |
| [PickFacing](控制.md#pickfacing) | <span style="display:inline;color:#7575f9">客户端</span> | 获取准星选中的实体或者方块 |
| [SetCanAll](控制.md#setcanall) | <span style="display:inline;color:#7575f9">客户端</span> | 同时设置SetCanMoveSetCanJumpSetCanAttackSetCanWalkModeSetCanPerspectiveSetCanPauseSetCanChatSetCanScreenShotSetCanOpenInvSetCanDragSetCanInair |
| [SetCanAttack](控制.md#setcanattack) | <span style="display:inline;color:#7575f9">客户端</span> | 设置是否响应攻击 |
| [SetCanChat](控制.md#setcanchat) | <span style="display:inline;color:#7575f9">客户端</span> | 设置是否响应聊天按钮 |
| [SetCanDrag](控制.md#setcandrag) | <span style="display:inline;color:#7575f9">客户端</span> | 设置是否响应屏幕拖动 |
| [SetCanInair](控制.md#setcaninair) | <span style="display:inline;color:#7575f9">客户端</span> | 设置是否响应上升下降按钮(飞在空中时右下角的三个按钮) |
| [SetCanJump](控制.md#setcanjump) | <span style="display:inline;color:#7575f9">客户端</span> | 设置是否响应跳跃(以及在水中浮起) |
| [SetCanMove](控制.md#setcanmove) | <span style="display:inline;color:#7575f9">客户端</span> | 设置是否响应移动 |
| [SetCanOpenInv](控制.md#setcanopeninv) | <span style="display:inline;color:#7575f9">客户端</span> | 设置是否响应打开背包按钮 |
| [SetCanPause](控制.md#setcanpause) | <span style="display:inline;color:#7575f9">客户端</span> | 设置是否响应暂停按钮 |
| [SetCanPerspective](控制.md#setcanperspective) | <span style="display:inline;color:#7575f9">客户端</span> | 设置是否响应切换视角 |
| [SetCanScreenShot](控制.md#setcanscreenshot) | <span style="display:inline;color:#7575f9">客户端</span> | 设置是否响应截图按钮 |
| [SetCanWalkMode](控制.md#setcanwalkmode) | <span style="display:inline;color:#7575f9">客户端</span> | 设置是否响应切换行走模式 |
| [SetDeviceVibrate](控制.md#setdevicevibrate) | <span style="display:inline;color:#7575f9">客户端</span> | 设置设备震动 |
| [SetHoldTimeThreshold](控制.md#setholdtimethreshold) | <span style="display:inline;color:#7575f9">客户端</span> | 设置长按判定时间,即按着屏幕多长时间会触发长按操作 |
| [SetMoveLock](控制.md#setmovelock) | <span style="display:inline;color:#7575f9">客户端</span> | 设置是否锁住移动。实际上为是否响应十字键与遥感的操作。 |
| [SetShowRideUI](控制.md#setshowrideui) | <span style="display:inline;color:#ff5555">服务端</span> | 设置是否显示马匹的UI界面 |
| [SimulateTouchWithMouse](控制.md#simulatetouchwithmouse) | <span style="display:inline;color:#7575f9">客户端</span> | 模拟使用鼠标控制UIPC F11快捷键 |
| [UnlockInputVector](控制.md#unlockinputvector) | <span style="display:inline;color:#7575f9">客户端</span> | 解锁本地玩家方向键(移动轮盘)的输入 |
## AddPickBlacklist
<span style="display:inline;color:#7575f9">客户端</span>
method in mod.client.component.gameCompClient.GameComponentClient
- 描述
添加使用camera组件选取实体时的黑名单即该实体不会被选取到
- 参数
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
| :--- | :--- | :--- |
| entityId | str | 实体id |
- 返回值
| <div style="width: 4em">数据类型</div> | 说明 |
| :--- | :--- |
| bool | 设置是否成功 |
- 示例
```python
import mod.client.extraClientApi as clientApi
comp = clientApi.GetEngineCompFactory().CreateGame(levelId)
# 添加黑名单
comp.AddPickBlacklist(entityId)
```
## ClearPickBlacklist
<span style="display:inline;color:#7575f9">客户端</span>
method in mod.client.component.gameCompClient.GameComponentClient
- 描述
清除使用camera组件选取实体的黑名单
- 参数
- 返回值
| <div style="width: 4em">数据类型</div> | 说明 |
| :--- | :--- |
| bool | 设置是否成功 |
- 示例
```python
import mod.client.extraClientApi as clientApi
comp = clientApi.GetEngineCompFactory().CreateGame(levelId)
# 清除黑名单中所有实体
comp.ClearPickBlacklist()
```
## GetChosen
<span style="display:inline;color:#7575f9">客户端</span>
method in mod.client.component.cameraCompClient.CameraComponentClient
- 描述
获取屏幕点击位置的实体或方块信息通常与GetEntityByCoordEvent配合使用
- 参数
- 返回值
| <div style="width: 4em">数据类型</div> | 说明 |
| :--- | :--- |
| dict | 选中目标的数据,详见[PickFacing接口](控制.md#pickfacing)的备注 |
- 备注
- 目前只有在第一人称视角才能准确获取
- 示例
```python
import mod.client.extraClientApi as clientApi
# 当玩家点击屏幕时获取点击位置的entityId
class MyClientSystem(ClientSystem):
def __init__(self, namespace, name):
ClientSystem.__init__(self, namespace, name)
self.ListenForEvent('Minecraft', 'Engine', 'GetEntityByCoordEvent', self, self.click)
def click(self, args):
comp = clientApi.GetEngineCompFactory().CreateCamera(levelId)
pickData = comp.GetChosen()
```
## GetChosenEntity
<span style="display:inline;color:#7575f9">客户端</span>
method in mod.client.component.cameraCompClient.CameraComponentClient
- 描述
获取屏幕点击位置的实体id通常与GetEntityByCoordEvent配合使用
- 参数
- 返回值
| <div style="width: 4em">数据类型</div> | 说明 |
| :--- | :--- |
| str | 实体id |
- 备注
- 目前只有在第一人称视角才能准确获取
- 示例
```python
# 当玩家点击屏幕时获取点击位置的entityId
import mod.client.extraClientApi as clientApi
class MyClientSystem(ClientSystem):
def __init__(self, namespace, name):
ClientSystem.__init__(self, namespace, name)
self.ListenForEvent('Minecraft', 'Engine', 'GetEntityByCoordEvent', self, self.click)
def click(self, args):
comp = clientApi.GetEngineCompFactory().CreateCamera(levelId)
entityId = comp.GetChosenEntity()
```
## GetHoldTimeThresholdInMs
<span style="display:inline;color:#7575f9">客户端</span>
method in mod.client.component.operationCompClient.OperationCompClient
- 描述
获取长按判定时间,即按着屏幕多长时间会触发长按操作
- 参数
- 返回值
| <div style="width: 4em">数据类型</div> | 说明 |
| :--- | :--- |
| int | 时间单位毫秒。默认为400 |
- 示例
```python
import mod.client.extraClientApi as clientApi
comp = clientApi.GetEngineCompFactory().CreateOperation(levelId)
timeMs = comp.GetHoldTimeThresholdInMs()
```
## GetInputVector
<span style="display:inline;color:#7575f9">客户端</span>
method in mod.client.component.actorMotionCompClient.ActorMotionComponentClient
- 描述
获取方向键(移动轮盘)的输入
- 参数
- 返回值
| <div style="width: 4em">数据类型</div> | 说明 |
| :--- | :--- |
| tuple(float,float) | 返回一个单位向量,向量第一项为向左的大小,第二项为向前的大小 |
- 示例
```python
import mod.client.extraClientApi as clientApi
comp = clientApi.GetEngineCompFactory().CreateActorMotion(localPlayerId)
left, up = comp.GetInputVector()
```
## GetTouchPos
<span style="display:inline;color:#7575f9">客户端</span>
method in mod.client.extraClientApi
- 描述
获取点击的屏幕坐标。可以监听TapBeforeClientEvent或TapOrHoldReleaseClientEvent事件调用本API获取点击坐标。
- 参数
- 返回值
| <div style="width: 4em">数据类型</div> | 说明 |
| :--- | :--- |
| tuple(float,float) | 屏幕坐标 |
- 示例
```python
import mod.client.extraClientApi as clientApi
def GetTouchPosTest():
touchX, touchY = clientApi.GetTouchPos()
```
## LockInputVector
<span style="display:inline;color:#7575f9">客户端</span>
method in mod.client.component.actorMotionCompClient.ActorMotionComponentClient
- 描述
锁定本地玩家方向键(移动轮盘)的输入,可使本地玩家持续向指定方向前行,且不会再受玩家输入影响
- 参数
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
| :--- | :--- | :--- |
| inputVector | tuple(float,float) | 输入向量,第一项控制向左的大小,第二项控制向前的大小。传入(0, 0)时玩家将会被强制固定在原地,不允许移动。 |
- 返回值
| <div style="width: 4em">数据类型</div> | 说明 |
| :--- | :--- |
| bool | 是否锁定成功True:成功 False:失败 |
- 备注
- 传入的向量会被转化为单位向量,因此传入(10, 0)与传入(0.1, 0)效果相同
- 示例
```python
import mod.client.extraClientApi as clientApi
# 使玩家向左前方持续移动
localPlayerId = clientApi.GetLocalPlayerId()
rotComp = clientApi.GetEngineCompFactory().CreateRot(localPlayerId)
motionComp = clientApi.GetEngineCompFactory().CreateActorMotion(localPlayerId)
motionComp.LockInputVector((1, 1))
```
## PickFacing
<span style="display:inline;color:#7575f9">客户端</span>
method in mod.client.component.cameraCompClient.CameraComponentClient
- 描述
获取准星选中的实体或者方块
- 参数
- 返回值
| <div style="width: 4em">数据类型</div> | 说明 |
| :--- | :--- |
| dict | 选中目标的数据,详见备注 |
- 备注
- 选中目标为实体时,返回值为:
```python
{
"type": "Entity",
"entityId": entityId
}
```
- 选中目标为方块时,返回值为:
```python
{
"type": "Block",
"x": x,
"y": y,
"z": z,
"face": face
}
```
- 没有选中目标时,返回值为:
```python
{
"type": "None"
}
```
- 示例
```python
import mod.client.extraClientApi as clientApi
comp = clientApi.GetEngineCompFactory().CreateCamera(levelId)
pickData = comp.PickFacing()
```
## SetCanAll
<span style="display:inline;color:#7575f9">客户端</span>
method in mod.client.component.operationCompClient.OperationCompClient
- 描述
同时设置SetCanMoveSetCanJumpSetCanAttackSetCanWalkModeSetCanPerspectiveSetCanPauseSetCanChatSetCanScreenShotSetCanOpenInvSetCanDragSetCanInair
- 参数
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
| :--- | :--- | :--- |
| all | bool | True为全部响应 |
- 返回值
| <div style="width: 4em">数据类型</div> | 说明 |
| :--- | :--- |
| bool | 设置是否成功 |
- 备注
- 要在其他属性设置之前设置不然在all之前设置的会被覆盖掉
- 示例
```python
import mod.client.extraClientApi as clientApi
comp = clientApi.GetEngineCompFactory().CreateOperation(levelId)
# 全部设置为不响应
comp.SetCanAll(False)
```
## SetCanAttack
<span style="display:inline;color:#7575f9">客户端</span>
method in mod.client.component.operationCompClient.OperationCompClient
- 描述
设置是否响应攻击
- 参数
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
| :--- | :--- | :--- |
| attack | bool | True为可攻击 |
- 返回值
| <div style="width: 4em">数据类型</div> | 说明 |
| :--- | :--- |
| bool | 设置是否成功 |
- 示例
```python
import mod.client.extraClientApi as clientApi
comp = clientApi.GetEngineCompFactory().CreateOperation(levelId)
# 不响应攻击
comp.SetCanAttack(False)
```
## SetCanChat
<span style="display:inline;color:#7575f9">客户端</span>
method in mod.client.component.operationCompClient.OperationCompClient
- 描述
设置是否响应聊天按钮
- 参数
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
| :--- | :--- | :--- |
| chat | bool | True为可打开聊天页面 |
- 返回值
| <div style="width: 4em">数据类型</div> | 说明 |
| :--- | :--- |
| bool | 设置是否成功 |
- 示例
```python
import mod.client.extraClientApi as clientApi
comp = clientApi.GetEngineCompFactory().CreateOperation(levelId)
# 不响应聊天按钮
comp.SetCanChat(False)
```
## SetCanDrag
<span style="display:inline;color:#7575f9">客户端</span>
method in mod.client.component.operationCompClient.OperationCompClient
- 描述
设置是否响应屏幕拖动
- 参数
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
| :--- | :--- | :--- |
| drag | bool | True为可拖动屏幕 |
- 返回值
| <div style="width: 4em">数据类型</div> | 说明 |
| :--- | :--- |
| bool | 设置是否成功 |
- 示例
```python
import mod.client.extraClientApi as clientApi
comp = clientApi.GetEngineCompFactory().CreateOperation(levelId)
# 不响应屏幕拖动
comp.SetCanDrag(False)
```
## SetCanInair
<span style="display:inline;color:#7575f9">客户端</span>
method in mod.client.component.operationCompClient.OperationCompClient
- 描述
设置是否响应上升下降按钮(飞在空中时右下角的三个按钮)
- 参数
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
| :--- | :--- | :--- |
| inair | bool | True为可点击 |
- 返回值
| <div style="width: 4em">数据类型</div> | 说明 |
| :--- | :--- |
| bool | 设置是否成功 |
- 示例
```python
import mod.client.extraClientApi as clientApi
comp = clientApi.GetEngineCompFactory().CreateOperation(levelId)
# 不响应空中控制按钮
comp.SetCanInair(False)
```
## SetCanJump
<span style="display:inline;color:#7575f9">客户端</span>
method in mod.client.component.operationCompClient.OperationCompClient
- 描述
设置是否响应跳跃(以及在水中浮起)
- 参数
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
| :--- | :--- | :--- |
| jump | bool | True为可跳跃 |
- 返回值
| <div style="width: 4em">数据类型</div> | 说明 |
| :--- | :--- |
| bool | 设置是否成功 |
- 示例
```python
import mod.client.extraClientApi as clientApi
comp = clientApi.GetEngineCompFactory().CreateOperation(levelId)
# 不响应跳跃
comp.SetCanJump(False)
```
## SetCanMove
<span style="display:inline;color:#7575f9">客户端</span>
method in mod.client.component.operationCompClient.OperationCompClient
- 描述
设置是否响应移动
- 参数
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
| :--- | :--- | :--- |
| move | bool | True为可移动 |
- 返回值
| <div style="width: 4em">数据类型</div> | 说明 |
| :--- | :--- |
| bool | 设置是否成功 |
- 备注
- 与SetMoveLock的区别调用SetCanMove会清除当前Input Vector例如玩家一直按着前进键调用SetCanMove(False)会立即停下来调用SetMoveLock(True)则不会。
- 示例
```python
import mod.client.extraClientApi as clientApi
comp = clientApi.GetEngineCompFactory().CreateOperation(levelId)
# 不响应移动
comp.SetCanMove(False)
```
## SetCanOpenInv
<span style="display:inline;color:#7575f9">客户端</span>
method in mod.client.component.operationCompClient.OperationCompClient
- 描述
设置是否响应打开背包按钮
- 参数
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
| :--- | :--- | :--- |
| open | bool | True为可打开背包 |
- 返回值
| <div style="width: 4em">数据类型</div> | 说明 |
| :--- | :--- |
| bool | 设置是否成功 |
- 示例
```python
import mod.client.extraClientApi as clientApi
comp = clientApi.GetEngineCompFactory().CreateOperation(levelId)
# 不响应打开背包按钮
comp.SetCanOpenInv(False)
```
## SetCanPause
<span style="display:inline;color:#7575f9">客户端</span>
method in mod.client.component.operationCompClient.OperationCompClient
- 描述
设置是否响应暂停按钮
- 参数
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
| :--- | :--- | :--- |
| pause | bool | True为可打开暂停页面 |
- 返回值
| <div style="width: 4em">数据类型</div> | 说明 |
| :--- | :--- |
| bool | 设置是否成功 |
- 示例
```python
import mod.client.extraClientApi as clientApi
comp = clientApi.GetEngineCompFactory().CreateOperation(levelId)
# 不响应暂停按钮
comp.SetCanPause(False)
```
## SetCanPerspective
<span style="display:inline;color:#7575f9">客户端</span>
method in mod.client.component.operationCompClient.OperationCompClient
- 描述
设置是否响应切换视角
- 参数
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
| :--- | :--- | :--- |
| persp | bool | True为可切换 |
- 返回值
| <div style="width: 4em">数据类型</div> | 说明 |
| :--- | :--- |
| bool | 设置是否成功 |
- 示例
```python
import mod.client.extraClientApi as clientApi
comp = clientApi.GetEngineCompFactory().CreateOperation(levelId)
# 不响应切换视角
comp.SetCanPerspective(False)
```
## SetCanScreenShot
<span style="display:inline;color:#7575f9">客户端</span>
method in mod.client.component.operationCompClient.OperationCompClient
- 描述
设置是否响应截图按钮
- 参数
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
| :--- | :--- | :--- |
| shot | bool | True为可截图 |
- 返回值
| <div style="width: 4em">数据类型</div> | 说明 |
| :--- | :--- |
| bool | 设置是否成功 |
- 示例
```python
import mod.client.extraClientApi as clientApi
comp = clientApi.GetEngineCompFactory().CreateOperation(levelId)
# 不响应截图按钮
comp.SetCanScreenShot(False)
```
## SetCanWalkMode
<span style="display:inline;color:#7575f9">客户端</span>
method in mod.client.component.operationCompClient.OperationCompClient
- 描述
设置是否响应切换行走模式
- 参数
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
| :--- | :--- | :--- |
| walkmode | bool | True为可切换 |
- 返回值
| <div style="width: 4em">数据类型</div> | 说明 |
| :--- | :--- |
| bool | 设置是否成功 |
- 示例
```python
import mod.client.extraClientApi as clientApi
comp = clientApi.GetEngineCompFactory().CreateOperation(levelId)
# 不响应切换行走模式
comp.SetCanWalkMode(False)
```
## SetDeviceVibrate
<span style="display:inline;color:#7575f9">客户端</span>
method in mod.client.component.deviceCompClient.DeviceCompClient
- 描述
设置设备震动
- 参数
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
| :--- | :--- | :--- |
| milliSeconds | int | 震动时间(单位:毫秒) |
- 返回值
| <div style="width: 4em">数据类型</div> | 说明 |
| :--- | :--- |
| bool | 设置是否成功 |
- 备注
- 设置时间区间为[1,5000]毫秒如果milliSeconds参数大于该区间将会被设置为5000毫秒小于则设为1毫秒
- 调用时距离上次震动结束的时间不能短于2秒如果短于2秒本次设置将会失败
- 设置震动失败函数返回False的可能原因距离上次震动结束还未超过2秒、当前已经处于震动状态、设备不支持震动等
- 即使函数返回值为True也有可能因为未正确判断设备是否支持震动、设备权限上禁止震动等原因未能真正震动
- 在目前版本中还不支持对IOS设备进行震动
- 示例
```python
import mod.client.extraClientApi as clientApi
comp = clientApi.GetEngineCompFactory().CreateDevice(entityId)
comp.SetDeviceVibrate(1000)
```
## SetHoldTimeThreshold
<span style="display:inline;color:#7575f9">客户端</span>
method in mod.client.component.operationCompClient.OperationCompClient
- 描述
设置长按判定时间,即按着屏幕多长时间会触发长按操作
- 参数
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
| :--- | :--- | :--- |
| time | int | 时间单位毫秒。默认为400 |
- 返回值
| <div style="width: 4em">数据类型</div> | 说明 |
| :--- | :--- |
| bool | 设置是否成功 |
- 示例
```python
import mod.client.extraClientApi as clientApi
comp = clientApi.GetEngineCompFactory().CreateOperation(levelId)
comp.SetHoldTimeThreshold(100)
```
## SetMoveLock
<span style="display:inline;color:#7575f9">客户端</span>
method in mod.client.component.operationCompClient.OperationCompClient
- 描述
设置是否锁住移动。实际上为是否响应十字键与遥感的操作。
- 参数
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
| :--- | :--- | :--- |
| movelock | bool | True为锁住 |
- 返回值
| <div style="width: 4em">数据类型</div> | 说明 |
| :--- | :--- |
| bool | 设置是否成功 |
- 备注
- 与SetCanMove的区别调用SetCanMove会清除当前Input Vector例如玩家一直按着前进键调用SetCanMove(False)会立即停下来调用SetMoveLock(True)则不会。
- 示例
```python
import mod.client.extraClientApi as clientApi
comp = clientApi.GetEngineCompFactory().CreateOperation(levelId)
# 锁住移动
comp.SetMoveLock(True)
```
## SetShowRideUI
<span style="display:inline;color:#ff5555">服务端</span>
method in mod.server.component.rideCompServer.RideCompServer
- 描述
设置是否显示马匹的UI界面
- 参数
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
| :--- | :--- | :--- |
| tamedEntityId | str | 可骑乘生物id |
| isShowUI | bool | 是否显示UI |
- 返回值
| <div style="width: 4em">数据类型</div> | 说明 |
| :--- | :--- |
| bool | 设置结果 |
- 示例
```python
import mod.server.extraServerApi as serverApi
comp = serverApi.GetEngineCompFactory().CreateRide(entityId)
comp.SetShowRideUI(entityId,False)
```
## SimulateTouchWithMouse
<span style="display:inline;color:#7575f9">客户端</span>
method in mod.client.component.gameCompClient.GameComponentClient
- 描述
模拟使用鼠标控制UIPC F11快捷键
- 参数
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
| :--- | :--- | :--- |
| touch | bool | True:进入鼠标模式False:退出鼠标模式 |
- 返回值
| <div style="width: 4em">数据类型</div> | 说明 |
| :--- | :--- |
| bool | 模拟结果 |
- 示例
```python
import mod.client.extraClientApi as clientApi
comp = clientApi.GetEngineCompFactory().CreateGame(levelId)
comp.SimulateTouchWithMouse(True)
```
## UnlockInputVector
<span style="display:inline;color:#7575f9">客户端</span>
method in mod.client.component.actorMotionCompClient.ActorMotionComponentClient
- 描述
解锁本地玩家方向键(移动轮盘)的输入
- 参数
- 返回值
| <div style="width: 4em">数据类型</div> | 说明 |
| :--- | :--- |
| bool | 是否解锁成功True:成功 False:失败 |
- 示例
```python
import mod.client.extraClientApi as clientApi
# 解锁使用LockInputVector锁定的本地玩家方向键移动轮盘输入
comp = clientApi.GetEngineCompFactory().CreateActorMotion(localPlayerId)
motionComp.UnlockInputVector()
```