mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-10-09 00:26:11 +00:00
更新无限地图
This commit is contained in:
@@ -24,6 +24,7 @@ import { TableGRoleAttackBullet } from "../resources/config/ts/TableGRoleAttackB
|
||||
import { TableGRoleAttackEffect } from "../resources/config/ts/TableGRoleAttackEffect";
|
||||
import { TableGRoleSkill } from "../resources/config/ts/TableGRoleSkill";
|
||||
import { TableGRoleSkillEffect } from "../resources/config/ts/TableGRoleSkillEffect";
|
||||
import { TableGMap } from "../resources/config/ts/TableGMap";
|
||||
|
||||
let IP = "kyu.jisol.cn";
|
||||
|
||||
@@ -113,6 +114,7 @@ export class JNGConfig extends SystemBase{
|
||||
{name:TableGRoleAttackEffect.TableName}, //角色攻击特效
|
||||
{name:TableGRoleSkill.TableName}, //角色技能
|
||||
{name:TableGRoleSkillEffect.TableName}, //角色技能特效
|
||||
{name:TableGMap.TableName}, //游戏地图
|
||||
].map((table) => {
|
||||
return {
|
||||
name:table.name,
|
||||
@@ -133,9 +135,10 @@ export class JNGConfig extends SystemBase{
|
||||
//角色初始器
|
||||
export class JLoaderRole extends JLoaderSystem{
|
||||
|
||||
skData:{[id:number]:sp.SkeletonData} = {};
|
||||
skData:{[id:number]:sp.SkeletonData} = {}; //角色Spine
|
||||
bullets:{[id:number]:SpriteFrame} = {};
|
||||
effects:{[id:number]:sp.SkeletonData} = {};
|
||||
effects:{[id:number]:sp.SkeletonData} = {}; //Spine特效
|
||||
maps:{[id:number]:SpriteFrame[]} = {}; //地图
|
||||
|
||||
async onInit(): Promise<any> {
|
||||
await super.onInit();
|
||||
@@ -175,6 +178,21 @@ export class JLoaderRole extends JLoaderSystem{
|
||||
})
|
||||
}))
|
||||
}
|
||||
|
||||
//读取地图
|
||||
for (const info of Object.values(TableGMap.getAllConfig())) {
|
||||
|
||||
this.maps[info.id] = await (Promise.all(["1","2","3"].map(index => `map${index}`).map(key => {
|
||||
return new Promise<SpriteFrame>(r => {
|
||||
if(info[key]){
|
||||
this.bundle.load(info[key],SpriteFrame,(err,data) => {
|
||||
r(data);
|
||||
})
|
||||
}
|
||||
})
|
||||
})))
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -191,5 +209,5 @@ export const app = {
|
||||
}), //请求
|
||||
battle : GBattleModeManager.getIns(), //战斗
|
||||
config : new JNGConfig(),
|
||||
role : new JLoaderRole("role"), //role包
|
||||
battleRes : new JLoaderRole("battle"), //battle包
|
||||
}
|
Reference in New Issue
Block a user