PlayManager
Link to playmanager
This class was added by a mod with mod-id cinematic_transitions
. 因此,如果要使用此功能,则需要安装此mod。
导入类
Link to 导入类
It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.
ZenScript Copyimport mods.cinematic_transitions.PlayManager;
Static Methods
Link to static-methods
Name: playPopUp
Return Type: void
ZenScript CopyPlayManager.playPopUp(registryName as string) as void
参数 | 类型 | 描述 |
---|---|---|
参数 registryName | 类型 string | 描述 take the registry name of a PopUp registered using Json, plays the popup provided. |
Name: playTransition
Plays transition (black bars on the top and bottom of screen) with no children (popups)
Return Type: void
ZenScript Copy// PlayManager.playTransition() as void
PlayManager.playTransition();
Name: playTransition
Return Type: void
ZenScript CopyPlayManager.playTransition(childName as string) as void
参数 | 类型 | 描述 |
---|---|---|
参数 childName | 类型 string | 描述 Plays transition with child. Syncs up the child wait duration and transition length to parent's |
Name: registerBiomePopUpListener
Registers a listener that triggers given popup when player enters given biome
Return Type: void
ZenScript CopyPlayManager.registerBiomePopUpListener(biomeName as string, popUp as string, hasTransition as boolean) as void
参数 | 类型 | 描述 |
---|---|---|
参数 biomeName | 类型 string | 描述 registry name of biome |
参数 popUp | 类型 string | 描述 registry name of popup |
参数 hasTransition | 类型 布尔值 | 描述 whether if transition should be played |
Name: registerDimensionPopUpListener
Registers a listener that triggers given popup when player enters given dimension
Return Type: void
ZenScript CopyPlayManager.registerDimensionPopUpListener(dimensionName as string, popUp as string, hasTransition as boolean) as void
参数 | 类型 | 描述 |
---|---|---|
参数 dimensionName | 类型 string | 描述 registry name of dimension |
参数 popUp | 类型 string | 描述 registry name of popup |
参数 hasTransition | 类型 布尔值 | 描述 whether if transition should be played |
Name: registerEntityPopUpListener
Registers a listener that triggers given popup when given entity spawns
Return Type: void
ZenScript CopyPlayManager.registerEntityPopUpListener(entityName as string, popUp as string, hasTransition as boolean) as void
参数 | 类型 | 描述 |
---|---|---|
参数 entityName | 类型 string | 描述 entity type |
参数 popUp | 类型 string | 描述 registry name of popup |
参数 hasTransition | 类型 布尔值 | 描述 whether if transition should be played |
Name: registerStructurePopUpListener
Registers a listener that triggers given popup when player enters given structure
Return Type: void
ZenScript CopyPlayManager.registerStructurePopUpListener(structureName as string, popUp as string, hasTransition as boolean) as void
参数 | 类型 | 描述 |
---|---|---|
参数 structureName | 类型 string | 描述 registry name of structure |
参数 popUp | 类型 string | 描述 registry name of popup |
参数 hasTransition | 类型 布尔值 | 描述 whether if transition should be played |
Name: setHideInventory
Return Type: void
ZenScript CopyPlayManager.setHideInventory(hideInventory as boolean) as void
参数 | 类型 | 描述 |
---|---|---|
参数 hideInventory | 类型 布尔值 | 描述 whether if the hotbar, health, etc should be hidden during popup/transition |