mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-10-09 00:26:11 +00:00
update 添加松鼠角色
This commit is contained in:
@@ -17,14 +17,15 @@ import GBattleModeManager from "./battle/GBattleModeManager";
|
||||
import { GLayer, UIConfig } from "./ui/UIConfig";
|
||||
import JLoaderSystem from "../../extensions/ngame/assets/ngame/system/JLoaderSystem";
|
||||
import { TableGRole } from "../resources/config/ts/TableGRole";
|
||||
import loader from "../../extensions/ngame/assets/ngame/util/loader";
|
||||
import { Prefab } from "cc";
|
||||
import { sp } from "cc";
|
||||
import { TableGRoleAttack } from "../resources/config/ts/TableGRoleAttack";
|
||||
import { SpriteFrame } from "cc";
|
||||
import { TableGRoleAttackBullet } from "../resources/config/ts/TableGRoleAttackBullet";
|
||||
import { TableGRoleAttackEffect } from "../resources/config/ts/TableGRoleAttackEffect";
|
||||
import { TableGRoleSkill } from "../resources/config/ts/TableGRoleSkill";
|
||||
import { TableGRoleSkillEffect } from "../resources/config/ts/TableGRoleSkillEffect";
|
||||
|
||||
let IP = "192.168.0.126";
|
||||
let IP = "192.168.1.23";
|
||||
|
||||
//重写UI
|
||||
class JNGLayer extends JNLayer{
|
||||
@@ -109,6 +110,9 @@ export class JNGConfig extends SystemBase{
|
||||
{name:TableGRole.TableName}, //角色
|
||||
{name:TableGRoleAttack.TableName}, //角色攻击
|
||||
{name:TableGRoleAttackBullet.TableName}, //角色攻击子弹
|
||||
{name:TableGRoleAttackEffect.TableName}, //角色攻击特效
|
||||
{name:TableGRoleSkill.TableName}, //角色技能
|
||||
{name:TableGRoleSkillEffect.TableName}, //角色技能特效
|
||||
].map((table) => {
|
||||
return {
|
||||
name:table.name,
|
||||
@@ -131,8 +135,11 @@ export class JLoaderRole extends JLoaderSystem{
|
||||
|
||||
skData:{[id:number]:sp.SkeletonData} = {};
|
||||
bullets:{[id:number]:SpriteFrame} = {};
|
||||
effects:{[id:number]:sp.SkeletonData} = {};
|
||||
|
||||
async onInit(): Promise<any> {
|
||||
await super.onInit();
|
||||
|
||||
//将配置表的角色都读取出来
|
||||
for (const info of Object.values(TableGRole.getAllConfig())) {
|
||||
this.skData[info.id] = await (new Promise(r => {
|
||||
@@ -141,6 +148,7 @@ export class JLoaderRole extends JLoaderSystem{
|
||||
})
|
||||
}))
|
||||
}
|
||||
|
||||
//将所有子弹读取出来
|
||||
for (const info of Object.values(TableGRoleAttackBullet.getAllConfig())) {
|
||||
this.bullets[info.id] = await (new Promise(r => {
|
||||
@@ -149,6 +157,24 @@ export class JLoaderRole extends JLoaderSystem{
|
||||
})
|
||||
}))
|
||||
}
|
||||
|
||||
//攻击特效读取
|
||||
for (const info of Object.values(TableGRoleAttackEffect.getAllConfig())) {
|
||||
this.effects[info.id] = await (new Promise(r => {
|
||||
this.bundle.load(info.spine,sp.SkeletonData,(err,data) => {
|
||||
r(data);
|
||||
})
|
||||
}))
|
||||
}
|
||||
|
||||
//技能特效读取
|
||||
for (const info of Object.values(TableGRoleSkillEffect.getAllConfig())) {
|
||||
this.effects[info.id] = await (new Promise(r => {
|
||||
this.bundle.load(info.spine,sp.SkeletonData,(err,data) => {
|
||||
r(data);
|
||||
})
|
||||
}))
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user