--- sidebarDepth: 1 --- # 动画 ## PlayTpAnimation 客户端 method in mod.client.component.playerAnimCompClient.PlayerAnimCompClient - 描述 第三人称视角播放玩家通用动作 - 参数 | 参数名 |
数据类型
| 说明 | | :--- | :--- | :--- | | anim | str | 动作名称,如sneaking | - 返回值 |
数据类型
| 说明 | | :--- | :--- | | bool | 是否成功 | - 备注 - 支持的动作包括:sneaking、sneaking_inverted、swim、sleeping、holding_left、holding_right、crossbow_hold、crossbow_equipped、bow_equipped、upside_down、tp_attack - 示例 ```python import mod.client.extraClientApi as clientApi comp = clientApi.GetEngineCompFactory().CreatePlayerAnim(playerId) comp.PlayTpAnimation("sneaking") ``` ## StopAnimation 客户端 method in mod.client.component.playerAnimCompClient.PlayerAnimCompClient - 描述 停止播放玩家通用动作 - 参数 | 参数名 |
数据类型
| 说明 | | :--- | :--- | :--- | | anim | str | 动作名称,如sneaking | - 返回值 |
数据类型
| 说明 | | :--- | :--- | | bool | 是否成功 | - 示例 ```python import mod.client.extraClientApi as clientApi comp = clientApi.GetEngineCompFactory().CreatePlayerAnim(playerId) comp.StopAnimation("sneaking") ```