Class: bundle
index / bundle
Class: bundle
bundle 管理器
Remarks
封装(加载/预加载)场景为 load_scene
支持(远程/本地) bundle
支持 bundle 热更
封装(bundle/scene)切换事件
支持 bundle 管理器,用于子游戏管理
Hierarchy
↳
bundle
Table of contents
Constructors
Properties
Accessors
Methods
Constructors
constructor
• new bundle()
Overrides
Defined in
assets/@framework/resources/mk_bundle.ts:61
Properties
event
• event: event_target
<event_protocol
>
事件
Defined in
assets/@framework/resources/mk_bundle.ts:97
pre_bundle_s
• Optional
pre_bundle_s: string
上个场景bundle
Defined in
assets/@framework/resources/mk_bundle.ts:99
pre_scene_s
• pre_scene_s: string
上个场景名
Defined in
assets/@framework/resources/mk_bundle.ts:101
bundle_map
• bundle_map: Map
<string
, bundle_data
>
bundle列表
Defined in
assets/@framework/resources/mk_bundle.ts:103
switch_scene_b
• switch_scene_b: boolean
= false
切换场景状态
Defined in
assets/@framework/resources/mk_bundle.ts:105
Accessors
bundle_s
• get
bundle_s(): string
当前场景bundle
Returns
string
Defined in
assets/@framework/resources/mk_bundle.ts:108
• set
bundle_s(value_s_
): void
Parameters
Name | Type |
---|---|
value_s_ | string |
Returns
void
Defined in
assets/@framework/resources/mk_bundle.ts:112
scene_s
• get
scene_s(): string
当前场景名
Returns
string
Defined in
assets/@framework/resources/mk_bundle.ts:117
• set
scene_s(value_s
): void
Parameters
Name | Type |
---|---|
value_s | string |
Returns
void
Defined in
assets/@framework/resources/mk_bundle.ts:121
Methods
set
▸ set(bundle_
): void
设置 bundle 数据
Parameters
Name | Type | Description |
---|---|---|
bundle_ | bundle_data | bundle 信息 |
Returns
void
Defined in
assets/@framework/resources/mk_bundle.ts:142
load
▸ load(args_
): Promise
<null
| Bundle
>
加载 bundle
Parameters
Name | Type | Description |
---|---|---|
args_ | string | load_config | bundle 名 | 加载配置 |
Returns
Promise
<null
| Bundle
>
Defined in
assets/@framework/resources/mk_bundle.ts:160
load_scene
▸ load_scene(scene_s_
, config_?
): Promise
<boolean
>
切换场景
Parameters
Name | Type | Description |
---|---|---|
scene_s_ | string | 场景名 |
config_? | Partial <switch_scene_config > | 切换配置 |
Returns
Promise
<boolean
>
Defined in
assets/@framework/resources/mk_bundle.ts:222
reload
▸ reload(bundle_
): Promise
<null
| Bundle
>
重新加载 bundle
Parameters
Name | Type |
---|---|
bundle_ | bundle_info & Required <Pick <bundle_info , "origin_s" >> |
Returns
Promise
<null
| Bundle
>