mirror of
https://github.com/motajs/template.git
synced 2026-11-02 06:34:31 +08:00
refactor: 地图分区与尺寸优化
This commit is contained in:
1 parent
a01caba0c8
commit
4c48b63e7e
7 files changed
+441
-85
No files matched your search
@@ -214,12 +214,16 @@ export class CoreState implements ICoreState {
|
||||
const reference = new Map<string, Map<number, Uint32Array>>();
|
||||
for (const id of floors) {
|
||||
const floor = data[id];
|
||||
const state = this.maps.createLayerState(id);
|
||||
const bg = state.addLayer(floor.width, floor.height);
|
||||
const bg2 = state.addLayer(floor.width, floor.height);
|
||||
const event = state.addLayer(floor.width, floor.height);
|
||||
const fg = state.addLayer(floor.width, floor.height);
|
||||
const fg2 = state.addLayer(floor.width, floor.height);
|
||||
const state = this.maps.createLayerState(
|
||||
id,
|
||||
floor.width,
|
||||
floor.height
|
||||
);
|
||||
const bg = state.addLayer();
|
||||
const bg2 = state.addLayer();
|
||||
const event = state.addLayer();
|
||||
const fg = state.addLayer();
|
||||
const fg2 = state.addLayer();
|
||||
bg.setZIndex(BG_ZINDEX);
|
||||
bg2.setZIndex(BG2_ZINDEX);
|
||||
event.setZIndex(EVENT_ZINDEX);
|
||||
|
||||
Reference in new issue
Block a user