Przeglądaj źródła

feat:游戏关卡优化

zouwuqiang 1 rok temu
rodzic
commit
75b3828e71

Plik diff jest za duży
+ 0 - 0
assets/bundle/config/game/CheckpointLevel.json


+ 1 - 1
assets/script/game/checkpoint/Checkpoint.ts

@@ -73,6 +73,7 @@ export class EcsCheckpointSystem extends ecs.System {
 
         this.add(new InitCheckpointSystem());
         this.add(new CheckpointUpgradeSystem());
+        this.add(new CheckpointPathTriggerSystem())
         this.add(new VehicleOperationSystem());
         this.add(new StationOperationSystem());
         this.add(new CheckpointCheckSystem());
@@ -80,6 +81,5 @@ export class EcsCheckpointSystem extends ecs.System {
         this.add(new FullVehicleOperationSystem())
         this.add(new AddCellOperationSystem())
         this.add(new ClearCellOperationSystem())
-        this.add(new CheckpointPathTriggerSystem())
     }
 }

+ 84 - 15
assets/script/game/checkpoint/bll/InitCheckpoint.ts

@@ -56,10 +56,12 @@ export class InitCheckpointSystem extends ecs.ComblockSystem implements ecs.IEnt
                 e.CheckpointModel.peopleCount = peopleCount
                 const count = Math.ceil(peopleCount / 3)
                 const colorCount = this.distributePeopleToColorsByArray(peopleCount, levelColor)
-                const { gridPositions, gridColors, subwayPositions, subwayColors, subwayOrientations } = this.distributeToGridAndSubwayWithOptimizedPlacement(gridRowCount, gridColCount, colorCount, levelColor, 24)
+                const { gridPositions, gridColors, subwayPositions, subwayColors, subwayOrientations, obstaclePositions } = this.distributeToGridAndSubwayWithOptimizedPlacement(gridRowCount, gridColCount, colorCount, levelColor, 18)
+                this.createObstacle(e, obstaclePositions)
                 this.createMan(e, gridPositions, gridColors, levelColor)
                 this.createSubway(e, subwayPositions, subwayOrientations, subwayColors, levelColor)
                 this.createStation(e, stationCount)
+                // const vColor = e.CheckpointModel.puppets.map(v=>levelColor.findIndex((c)=>c===v.PuppetModel?.color)+1)
                 this.createVehicle(e, count, [], colorCount, levelColor)
             } else {  // 依据配置生成
                 this.createObstacle(e, obstaclePosition)
@@ -75,7 +77,7 @@ export class InitCheckpointSystem extends ecs.ComblockSystem implements ecs.IEnt
                 const colorArr = levelColor as number[]
 
                 let newPeoplePosition = []
-                if (peoplePosition&&peoplePosition.length>0) {
+                if (peoplePosition && peoplePosition.length > 0) {
                     newPeoplePosition = [...peoplePosition]
                 } else {
                     e.CheckpointModel.cells?.forEach((v, xIndex) => {
@@ -146,9 +148,8 @@ export class InitCheckpointSystem extends ecs.ComblockSystem implements ecs.IEnt
                 this.fillEmptyMapInfo(e)
 
             }
-
-            e.add(VehicleOperationComp)
             e.add(CheckpointPathTriggerComp)
+            e.add(VehicleOperationComp)
             e.remove(InitCheckpointComp)
             // 关闭加载界面
             oops.gui.remove(UIID.Loading);
@@ -227,24 +228,44 @@ export class InitCheckpointSystem extends ecs.ComblockSystem implements ecs.IEnt
     }
 
 
-    distributeToGridAndSubwayWithOptimizedPlacement(row: number, col: number, colorDistribution: any, colors: string[], subwayCapacity = 24) {
+    distributeToGridAndSubwayWithOptimizedPlacement(row: number, col: number, colorDistribution: any, colors: string[], subwayCapacity = 18) {
         const grid = Array.from({ length: row }, () => Array(col).fill(null));
         let freePositions = [];
-        let freePositionsCopy = [];
+        // let freePositionsCopy = [];
+        const obstacleCount = Math.floor(Math.random() * 8); // 随机生成个数
         for (let i = 0; i < row; i++) {
             for (let j = 0; j < col; j++) {
                 freePositions.push([i, j]);
-                freePositionsCopy.push([i, j]);
+                // freePositionsCopy.push([i, j]);
             }
         }
 
         const gridColors: number[] = []
         const gridPositions: [x: number, y: number][] = []
+        // const obstaclePositions: [x: number, y: number][] = []
         const subwayPositions: [x: number, y: number][] = [];
         const subwayColors: number[][] = [];
         const subwayOrientations: number[] = [];
         const cellCount = row * col
 
+
+        // 打乱freePositions数组
+        this.shuffleArray(freePositions);
+        // this.shuffleArray(freePositions); // 再洗一次,洗乱点
+
+        // 从打乱后的数组中选择前 obstacleCount 个位置为障碍物位置
+        const obstaclePositions: [x: number, y: number][] = freePositions.slice(0, obstacleCount);
+
+        // 若需要,从 freePositions 中移除这些障碍物位置
+        freePositions = freePositions.slice(obstacleCount);
+
+        obstaclePositions.forEach(([x, y]) => {
+            grid[x][y] = 'obstacle'
+        })
+
+
+        let freePositionsCopy = [...freePositions];
+
         // 创建颜色池
         let colorPool: number[] = [];
         colors.forEach((color, index) => {
@@ -266,22 +287,24 @@ export class InitCheckpointSystem extends ecs.ComblockSystem implements ecs.IEnt
         randColorPool.forEach((colorIndex) => {
             // let people = colorDistribution[colors[colorIndex-1]];
             if (freePositions.length > 0) {
-                let randomIndex = Math.floor(Math.random() * freePositions.length);
-                let [x, y] = freePositions[randomIndex];
+                // let randomIndex = Math.floor(Math.random() * freePositions.length);
+                // let [x, y] = freePositions[randomIndex];
+                let [x, y] = freePositions.shift();
                 grid[x][y] = colorIndex;
                 gridColors.push(colorIndex)
                 gridPositions.push([x, y])
-                freePositions.splice(randomIndex, 1);
+                // freePositions.splice(randomIndex, 1);
             } else {
 
                 if (!subwayColors[subwayColors.length - 1] || subwayColors[subwayColors.length - 1].length >= subwayCapacity) {
                     const orientation = getSubwayOrientation();
                     const filteredPositions = freePositionsCopy.filter(([x, y]) =>
-                        ((orientation === SubwayEnum.LEFT && y > 0) || (orientation === SubwayEnum.RIGHT && y < col - 1)) && grid[x][y] !== 'Subway' &&
-                        ((orientation === SubwayEnum.RIGHT && grid[x][y + 1] !== 'Subway') || (orientation === SubwayEnum.LEFT && grid[x][y - 1] !== 'Subway')));
+                        ((orientation === SubwayEnum.LEFT && y > 0) || (orientation === SubwayEnum.RIGHT && y < col - 1)) && grid[x][y] !== 'Subway' && grid[x][y] !== 'obstacle' &&
+                        ((orientation === SubwayEnum.RIGHT && grid[x][y + 1] !== 'Subway' && grid[x][y + 1] !== 'obstacle') || (orientation === SubwayEnum.LEFT && grid[x][y - 1] !== 'Subway' && grid[x][y - 1] !== 'obstacle')));
                     if (filteredPositions.length > 0) {
                         const index = Math.floor(Math.random() * filteredPositions.length);
                         const [subwayX, subwayY] = filteredPositions[index];
+                        // let [subwayX, subwayY] = filteredPositions.shift();
                         const gridColor = grid[subwayX][subwayY]
                         subwayPositions.push([subwayX, subwayY]);
                         const existIndex = gridPositions.findIndex(val => {
@@ -309,7 +332,8 @@ export class InitCheckpointSystem extends ecs.ComblockSystem implements ecs.IEnt
             gridColors,
             subwayPositions: subwayPositions.map(([x, y]) => [x + 1, y + 1]) as [x: number, y: number][],
             subwayColors,
-            subwayOrientations
+            subwayOrientations,
+            obstaclePositions:obstaclePositions.map(([x, y]) => [x + 1, y + 1]) as [x: number, y: number][],
         };
     }
 
@@ -333,12 +357,12 @@ export class InitCheckpointSystem extends ecs.ComblockSystem implements ecs.IEnt
         checkpoint_model.path_grid = Array.from({ length: row }, () => new Array(col).fill(null));
         const width = 0.442;
         const gap = 0.025;
-        const start_point = row % 2 === 0 ? v3(-(row / 2 * (width + gap) - gap / 2)+0.08, 0, 2.7) : v3(-(Math.floor(row / 2) * (width+gap) + width / 2), 0, 2.7)
+        const start_point = row % 2 === 0 ? v3(-(row / 2 * (width + gap) - gap / 2) + 0.08, 0, 2.7) : v3(-(Math.floor(row / 2) * (width + gap) + width / 2), 0, 2.7)
         for (let index = 0; index < row; index++) {
             for (let j = 0; j < col; j++) {
                 const gridEnt = ecs.getEntity<Grid>(Grid);
                 // 添加关卡到场景
-                const pos = v3(start_point.x + j * (width+gap), 0, start_point.z + index * (width+gap))
+                const pos = v3(start_point.x + j * (width + gap), 0, start_point.z + index * (width + gap))
                 gridEnt.load(checkpoint_root, pos);
                 e.addChild(gridEnt)
                 checkpoint_model.grids[index][j] = gridEnt
@@ -522,6 +546,51 @@ export class InitCheckpointSystem extends ecs.ComblockSystem implements ecs.IEnt
         }
     }
 
+    // // 生成交通工具
+    // createVehicleByReachColor(e: Checkpoint, count: number, pcolor: number[], colorCount: any, colors: string[]) {
+    //     const copyColorCount = { ...colorCount }
+    //     const checkpoint_root = e.CheckpointView.node
+    //     const checkpoint_model = e.CheckpointModel
+    //     const availablePositions = Array.from({ length: count }, (_, i) => i)
+    //     checkpoint_model.vehicles = Array(count).fill(null)
+    //     const start_point = v3(-6, 0, 0)
+    //     pcolor?.forEach((v, i) => {
+    //         const color = colors[pcolor[i] - 1]
+    //         if (copyColorCount[color] > 0) {
+    //             const vehicle = ecs.getEntity<Vehicle>(Vehicle);
+    //             availablePositions.shift()
+    //             copyColorCount[color] -= 3;
+    //             // 添加车到场景
+    //             vehicle.VehicleModel.color = color
+    //             const vehicleType = e.CheckpointModelLevel.rtluCurrent.vehicleType
+    //             vehicle.load(checkpoint_root, color, start_point, vehicleType);
+    //             e.addChild(vehicle)
+    //             checkpoint_model.vehicles[i] = vehicle
+    //         }
+    //     })
+    //     while (availablePositions.length > 0) {
+    //         let randomIndex = Math.floor(Math.random() * availablePositions.length);
+
+    //         let colorIndex = Math.floor(Math.random() * colors.length);
+    //         let color = colors[colorIndex];
+
+    //         if (copyColorCount[color] > 0) {
+    //             // if (randomIndex < pcolor.length) {
+    //             //     availablePositions.splice(randomIndex, 1);
+    //             // }
+    //             const vehicle = ecs.getEntity<Vehicle>(Vehicle);
+    //             let index = availablePositions.splice(randomIndex, 1)[0];
+    //             copyColorCount[color] -= 3;
+    //             // 添加车到场景
+    //             vehicle.VehicleModel.color = color
+    //             const vehicleType = e.CheckpointModelLevel.rtluCurrent.vehicleType
+    //             vehicle.load(checkpoint_root, color, start_point, vehicleType);
+    //             e.addChild(vehicle)
+    //             checkpoint_model.vehicles[index] = vehicle
+    //         }
+    //     }
+    // }
+
     // 生成交通工具
     createVehicle(e: Checkpoint, count: number, pcolor: number[], colorCount: any, colors: string[]) {
         const copyColorCount = { ...colorCount }

+ 51 - 16
assets/script/game/checkpoint/bll/VehicleOperation.ts

@@ -33,40 +33,76 @@ export class VehicleOperationSystem extends ecs.ComblockSystem implements ecs.IE
 
     entityEnter(e: Checkpoint): void {
         e.CheckpointModel.curVehicle = null
+        e.CheckpointModel.nextVehicle = null
         this.initCar(e)
     }
 
 
 
     initCar(e: Checkpoint) {
+        // const vehiclesCopy = e.CheckpointModel.vehicles
+        let vColor = e.CheckpointModel.puppets.filter(val => val.PathFind?.canReach).map(v => v.PuppetModel?.color)
+        // console.log(vColor)
+        if (vColor.length < 2) {
+            vColor = e.CheckpointModel.puppets.slice(0, 8).map(v => v.PuppetModel?.color)
+        }
+        // console.log(vColor)
+        // 统计颜色频率并按频率降序排序
+        const colorFrequency = vColor.reduce((acc, color) => {
+            acc[color] = (acc[color] || 0) + 1;
+            return acc;
+        }, {});
+        // console.log('e.CheckpointModel.nextVehicle.VehicleModel.color:',e.CheckpointModel.curVehicle?.VehicleModel?.color)
+        if(e.CheckpointModel.nextVehicle?.VehicleModel?.color&&colorFrequency[e.CheckpointModel.nextVehicle.VehicleModel.color]){
+            colorFrequency[e.CheckpointModel.nextVehicle.VehicleModel.color] -=3
+            // console.log('当前车辆色减去3个再计算多少')
+        }
+        // console.log(colorFrequency)
+        const sortedColors = Object.keys(colorFrequency).sort((a, b) => colorFrequency[b] - colorFrequency[a]);
         const vehicles = e.CheckpointModel.vehicles
-        for (let index = 0; index < vehicles.length; index++) {
-            const vehicle = vehicles[index];
-            if (index == 0) {
+
+        const getColorVehicle = () => {
+            const sortColor = sortedColors.shift()
+            const colorIndex = vehicles.findIndex(v=>v.VehicleModel.color===sortColor)
+            if(colorIndex>-1){
+                return vehicles.splice(colorIndex,1)[0]
+            }else{
+                return vehicles.shift()
+            }
+        }
+        if (!e.CheckpointModel.nextVehicle) {
+            const vehicle = getColorVehicle()
+            if (vehicle) {
                 e.CheckpointModel.curVehicle = vehicle
                 vehicle.VehicleView.animator.onStationComplete = () => {
                     // vehicle.remove(MoveToComp)
                     oops.audio.playEffect("common/audio/bus_horn");
                     e.add(StationOperationComp)
-                    // const checkpoint = smc.initialize.account.checkpoint
-                    // console.log('puppet', !checkpoint.CheckpointModel.puppets.some(val => val.PuppetModel?.color === vehicle.VehicleModel.color))
-                    // console.log('stations', !checkpoint.CheckpointModel.stations.some(val => val.StationModel.puppet && val.StationModel.puppet.PuppetModel?.color === vehicle.VehicleModel?.color))
-                    // if (!checkpoint.CheckpointModel.puppets.some(val => val.PuppetModel?.color === vehicle.VehicleModel.color)
-                    //     && !checkpoint.CheckpointModel.stations.some(val => val.StationModel.puppet && val.StationModel.puppet.PuppetModel?.color === vehicle.VehicleModel?.color)) {
-                    //     vehicle.VehicleModel.ready = true
-                    // }
                 }
                 vehicle.VehicleView?.animator.moveToStation()
             }
-            if (index == 1) {
-                vehicle.VehicleView?.animator.moveToWait()
-                break
+        } else {
+            const vehicle = e.CheckpointModel.nextVehicle
+            e.CheckpointModel.curVehicle = vehicle
+            vehicle.VehicleView.animator.onStationComplete = () => {
+                // vehicle.remove(MoveToComp)
+                oops.audio.playEffect("common/audio/bus_horn");
+                e.add(StationOperationComp)
+            }
+            e.CheckpointModel.nextVehicle = null
+            vehicle.VehicleView?.animator.moveToStation()
+        }
+
+        if (!e.CheckpointModel.nextVehicle) {
+            const nextVehicle = getColorVehicle()
+            if (nextVehicle) {
+                e.CheckpointModel.nextVehicle = nextVehicle
+                nextVehicle.VehicleView?.animator.moveToWait()
             }
         }
     }
- 
+
     update(e: Checkpoint): void {
-        const vehicles = e.CheckpointModel.vehicles
         const vehicle = e.CheckpointModel.curVehicle
 
         if (e.CheckpointModel.peopleCount <= 0) {
@@ -76,7 +112,6 @@ export class VehicleOperationSystem extends ecs.ComblockSystem implements ecs.IE
         }
 
         if (vehicle && vehicle.VehicleModel?.ready) {
-            vehicles.shift()
             vehicle.VehicleView.animator.onLeaveComplete = () => {
                 vehicle.destroy()
             }

+ 14 - 0
assets/script/game/checkpoint/model/CheckpointModel.ts

@@ -36,6 +36,8 @@ export class CheckpointModelComp extends ecs.Comp {
 
     private _curVehicle: Vehicle = null
 
+    private _nextVehicle: Vehicle = null
+
     private _peopleCount:number = 0
 
     get peopleCount(): number {
@@ -55,6 +57,14 @@ export class CheckpointModelComp extends ecs.Comp {
         this._curVehicle = _v
     }
 
+    get nextVehicle(): Vehicle {
+        return this._nextVehicle
+    }
+
+    set nextVehicle(_v: Vehicle) {
+        this._nextVehicle = _v
+    }
+
 
     /** 格子 */
     get grids(): Grid[][] {
@@ -108,6 +118,10 @@ export class CheckpointModelComp extends ecs.Comp {
         const flatArr = this.flattenArray(this.cells)
         return flatArr.filter(val => val instanceof Puppet && val.PuppetModel)
     }
+
+    // get canReachPuppets(): Puppet[] {
+    //     return this.puppets.filter(val => val.PathFind?.canReach===true)
+    // }
     get subways(): Subway[] {
         const flatArr = this.flattenArray(this.cells)
         return flatArr.filter(val => val instanceof Subway && val.SubwayModel)

+ 23 - 10
assets/script/game/checkpoint/view/CheckpointMainViewComp.ts

@@ -46,7 +46,7 @@ export class CheckpointMainViewComp extends CCComp {
         // console.log('当前平台',sys.os)
         // if (sys.os === sys.OS.IOS || sys.os === sys.OS.ANDROID) {
 
-           
+
         // }
         const safeArea = sys.getSafeAreaRect();
         const winSize = view.getVisibleSize();
@@ -128,12 +128,17 @@ export class CheckpointMainViewComp extends CCComp {
                 oops.gui.open(UIID.Skin);
                 break;
             case "btn_clear":
+                if (sys.platform === sys.Platform.MOBILE_BROWSER) {
+                    ecs.getSingleton(SingletonModuleComp).account.checkpoint.add(ClearCellOperationComp)
+                    ecs.getSingleton(SingletonModuleComp).account.checkpoint.CheckpointModelBase.vm.clearCount += 1
+                    return
+                }
                 if (checkpoint.CheckpointModelBase.vm.clearCount >= 3) {
                     oops.gui.toast('该关卡使用次数已满')
                     return
                 }
                 oops.gui.open(UIID.ClearCell);
-                DataSdk.reportEvent(REPORT_EVENT.CLICK_CLEAR_CELL,ecs.getSingleton(SingletonModuleComp)?.account?.AccountModel?.lv)
+                DataSdk.reportEvent(REPORT_EVENT.CLICK_CLEAR_CELL, ecs.getSingleton(SingletonModuleComp)?.account?.AccountModel?.lv)
                 // if (sys.platform === sys.Platform.WECHAT_GAME) {
                 //     oops.gui.open(UIID.ClearCell);
                 // } else {
@@ -146,14 +151,19 @@ export class CheckpointMainViewComp extends CCComp {
 
                 break;
             case "btn_add_cell":
+                if (sys.platform === sys.Platform.MOBILE_BROWSER) {
+                    ecs.getSingleton(SingletonModuleComp).account.checkpoint.add(AddCellOperationComp)
+                    ecs.getSingleton(SingletonModuleComp).account.checkpoint.CheckpointModelBase.vm.addCellCount += 1
+                    return
+                }
                 if (checkpoint.CheckpointModelBase.vm.addCellCount >= 3) {
                     oops.gui.toast('该关卡使用次数已满')
                     return
                 }
                 oops.gui.open(UIID.AddCell);
-                DataSdk.reportEvent(REPORT_EVENT.CLICK_ADD_CELL,ecs.getSingleton(SingletonModuleComp)?.account?.AccountModel?.lv)
+                DataSdk.reportEvent(REPORT_EVENT.CLICK_ADD_CELL, ecs.getSingleton(SingletonModuleComp)?.account?.AccountModel?.lv)
                 // if (sys.platform === sys.Platform.WECHAT_GAME) {
-                    // oops.gui.open(UIID.AddCell);
+                // oops.gui.open(UIID.AddCell);
                 // } else {
                 //     AdManager.getInstance().showRewardVideoAd(() => {
                 //         console.log('成功看完广告')
@@ -164,17 +174,20 @@ export class CheckpointMainViewComp extends CCComp {
 
                 break;
             case "btn_leave":
-                // ecs.getSingleton(SingletonModuleComp).account.checkpoint.add(FullVehicleOperationComp)
-                // ecs.getSingleton(SingletonModuleComp).account.checkpoint.CheckpointModelBase.vm.leaveCount += 1
-                // return
+                if (sys.platform === sys.Platform.MOBILE_BROWSER) {
+                    ecs.getSingleton(SingletonModuleComp).account.checkpoint.add(FullVehicleOperationComp)
+                    ecs.getSingleton(SingletonModuleComp).account.checkpoint.CheckpointModelBase.vm.leaveCount += 1
+                    return
+                }
+
                 if (checkpoint.CheckpointModelBase.vm.leaveCount >= 3) {
                     oops.gui.toast('该关卡使用次数已满')
                     return
                 }
                 oops.gui.open(UIID.VehicleLeave);
-                DataSdk.reportEvent(REPORT_EVENT.CLICK_LEAVE,ecs.getSingleton(SingletonModuleComp)?.account?.AccountModel?.lv)
+                DataSdk.reportEvent(REPORT_EVENT.CLICK_LEAVE, ecs.getSingleton(SingletonModuleComp)?.account?.AccountModel?.lv)
                 // if (sys.platform === sys.Platform.WECHAT_GAME) {
-                    // oops.gui.open(UIID.VehicleLeave);
+                // oops.gui.open(UIID.VehicleLeave);
                 // } else {
                 //     AdManager.getInstance().showRewardVideoAd(() => {
                 //         console.log('成功看完广告')
@@ -185,7 +198,7 @@ export class CheckpointMainViewComp extends CCComp {
                 break;
             case "btn_reward":
                 oops.gui.open(UIID.SideReward);
-                DataSdk.reportEvent(REPORT_EVENT.OPEN_REWARD,ecs.getSingleton(SingletonModuleComp)?.account?.AccountModel?.lv)
+                DataSdk.reportEvent(REPORT_EVENT.OPEN_REWARD, ecs.getSingleton(SingletonModuleComp)?.account?.AccountModel?.lv)
                 break;
         }
 

+ 1 - 0
assets/script/game/checkpoint/view/CheckpointSettingViewComp.ts

@@ -69,6 +69,7 @@ export class CheckpointSettingViewComp extends CCComp {
                 const checkpoint = ecs.getSingleton(SingletonModuleComp).account.checkpoint;
                 checkpoint.add(InitCheckpointComp)
                 DataSdk.reportEvent(REPORT_EVENT.LEVEL_REST,ecs.getSingleton(SingletonModuleComp)?.account?.AccountModel?.lv)
+                oops.gui.remove(UIID.Setting);
                 break;
             case "btn_close":
                 oops.gui.remove(UIID.Setting);

+ 1 - 1
assets/script/game/common/config/GameBase.ts

@@ -1,3 +1,3 @@
 export const BaseUrl = 'https://ooxxgame.com/'
 
-export const Version = "0.0.4"
+export const Version = "0.0.5"

+ 1 - 1
assets/script/game/common/ecs/path/PathFind.ts

@@ -135,7 +135,7 @@ export class PathFindSystem extends ecs.ComblockSystem<ecs.Entity> implements ec
                 let newY = y + dy;
                 // 检查新位置是否有效
                 if (newX >= 0 && newX < rows && newY >= 0 && newY < cols && !visited[newX][newY] && grid[newX][newY]?.fill == null) {
-                    queue.push([newX, newY, (path ? path.concat([grid[newX][newY].pos]) : [grid[x][y].pos, grid[newX][newY].pos])]);
+                    queue.push([newX, newY, (path ? path.concat([grid[newX][newY]?.pos]) : [grid[x][y]?.pos, grid[newX][newY]?.pos])]);
                 }
             }
         }

+ 3 - 1
assets/script/game/initialize/view/LoadingViewComp.ts

@@ -69,9 +69,11 @@ export class LoadingViewComp extends CCVMParentComp {
         // 加载游戏本地JSON数据的多语言提示文本
         this.data.prompt = oops.language.getLangByID("loading_load_json");
         return new Promise(async (resolve, reject) => {
-            let url = BaseUrl + '/cargame/' + Version + '/'
+            let url = BaseUrl + '/pccargame/' + Version + '/'
             if (sys.platform === sys.Platform.BYTEDANCE_MINI_GAME) {
                 url = BaseUrl + 'dycargame/' + Version + '/'
+            }else if(sys.platform === sys.Platform.WECHAT_MINI_PROGRAM){
+                url = BaseUrl + '/cargame/' + Version + '/'
             }
             await JsonUtil.loadNetAsync(url, TableCheckpointLevel.TableName);
             resolve(null);

+ 1 - 1
assets/script/game/vehicle/view/VehicleViewAnimator.ts

@@ -58,7 +58,7 @@ export class VehicleViewAnimator extends AnimatorSkeletal {
             }
 
             clearTimeout(this.timer)
-        }, 1000)
+        }, 800)
     }
 
     moveToLeave() {

BIN
excel/CheckpointLevel.xlsx


Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików