中文 | English

RocketDriver Pro

Logo

RocketDriver Pro is a game framework for Unity engine


6. Panel Manager (PanelManager)

6.1 Registration Information

6.1.1 Registration layer container information

PanelManagerShared.Manager.Register.RegisterLayer(containerName, 
  tranContainer, isDefault);

image

6.1.2 Registering background processing information

PanelManagerShared.Manager.Register.RegisterBackground(backgroundKey, 
  backgroundOrigin, backgroundScript);

image

6.1.3 Register animation information

PanelManagerShared.Manager.Register.RegisterAnimator(animKey, animAnimator);

image

6.1.4 Setting the base container for the panel

PanelManagerShared.Manager.Register.RegisterPanelContainer(container);

image

6.1.5 Registration panel information

PanelManagerShared.Manager.Register.RegisterPanelInfo(panelId,
  settings, maxDisplayNum, extendType);

image

6.1.6 Using the PanelManagerRegister component, you can handle the registration function of layer container, background, animation and panel information at the same time

image

6.1.7 Note

Background registration and Animation registration optional, only register when there are relevant requirements in the panel information.

6.2 Display Panel

6.2.1 To pop up a panel by panel id, you can select the specified panel layer container.

PanelManagerShared.Manager.ShowPanel(panelId);

image

6.2.2 Pop up the panel through the panel id, and pass in the parameter object, you can choose to specify the panel layer container.

PanelManagerShared.Manager.ShowPanel(panelId, panelParams);

image

6.3 Close Panel

6.3.1 Close the panel by the panel id.

You can choose to close the default, close the first display, and close the last display through the panel id:
image

6.3.2 Close the panel through instance information.

Close the panel accurately by providing the panel instance Id (instanceId), display view (view), and panel instance (IPanelInstance).
image

6.3.3 Close panels in batches.

You can choose to close all displayed panels, close all panels with a specified panel id, or close panels that match the matching function.
image

6.4 Advanced Applications

6.4.1 Custom Registrar

The registrar in IPanelManager can be customized, as long as the IPanelRegister interface is implemented.
image

6.4.2 Custom Loaders

The loader in IPanelManager can be customized, as long as the IIPanelLoaderAdapter interface is implemented.
image

6.4.3 Set panel display timing

SetShowMoment in IPanelManger can set the panel display timing (immediate display | frame end display)
image

6.4.4 IPanelSettings Description

The IPanelSettings instance is the interface of the panel configuration information saved when the panel is registered, including resource configuration, background configuration and animation configuration.

6.4.4.1 Resource Configuration

IPanelAssetSettings instance
Main configuration properties: BundleName, AssetPath, MainScriptName, MainScriptParams
image

6.4.4.2 Background configuration

IPanelBackgroundSettings instance

6.4.4.3 Animation Configuration

IPanelAnimSettings instance
image

6.4.5 Panel function extension

At this stage, there are 4 interfaces related to panel function expansion:
IInitPanel, IParamsPanel, IRefreshPanel, IDisposePanel
NOTE: IShowPanel, IClosePanel are deprecated.

6.5 Example

JLGames/RocketDriver/Samples/Panel
image