diff --git a/JNGame b/JNGame index e5ae6946..bce1ad35 160000 --- a/JNGame +++ b/JNGame @@ -1 +1 @@ -Subproject commit e5ae6946c8f1663d3025514e3ec9e3598debdcec +Subproject commit bce1ad3522fb8ed1497eee9e01bba38d53e97279 diff --git a/JisolGameCocos/assets/resources/config/game/GRoleSkill.json b/JisolGameCocos/assets/resources/config/game/GRoleSkill.json index bd9d1b8b..e80ead65 100644 --- a/JisolGameCocos/assets/resources/config/game/GRoleSkill.json +++ b/JisolGameCocos/assets/resources/config/game/GRoleSkill.json @@ -1 +1 @@ -{"40001":{"id":40001,"skillName":"疯狂松鼠","skillController":"GSkillCrazySquirrel","skillArgs":["10","250","250"],"skillText":"疯狂松鼠的技能 丢出巨大炸弹 轰炸全部玩家"}} \ No newline at end of file +{"40001":{"id":40001,"skillName":"疯狂松鼠","skillController":"GSkillCrazySquirrel","skillArgs":["5","250","250"],"skillText":"疯狂松鼠的技能 丢出巨大炸弹 轰炸全部玩家"}} \ No newline at end of file diff --git a/JisolGameCocos/assets/resources/prefab/ui/Home/HomeView.prefab b/JisolGameCocos/assets/resources/prefab/ui/Home/HomeView.prefab index bc2969b8..52af3e57 100644 --- a/JisolGameCocos/assets/resources/prefab/ui/Home/HomeView.prefab +++ b/JisolGameCocos/assets/resources/prefab/ui/Home/HomeView.prefab @@ -32,22 +32,25 @@ }, { "__id__": 60 + }, + { + "__id__": 75 } ], "_active": true, "_components": [ { - "__id__": 75 + "__id__": 90 }, { - "__id__": 77 + "__id__": 92 }, { - "__id__": 79 + "__id__": 94 } ], "_prefab": { - "__id__": 81 + "__id__": 96 }, "_lpos": { "__type__": "cc.Vec3", @@ -1777,6 +1780,369 @@ "targetOverrides": null, "nestedPrefabInstanceRoots": null }, + { + "__type__": "cc.Node", + "_name": "Button-001", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 76 + } + ], + "_active": true, + "_components": [ + { + "__id__": 82 + }, + { + "__id__": 84 + }, + { + "__id__": 86 + } + ], + "_prefab": { + "__id__": 89 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 108.634, + "y": 414.543, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "Label", + "_objFlags": 512, + "__editorExtras__": {}, + "_parent": { + "__id__": 75 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 77 + }, + { + "__id__": 79 + } + ], + "_prefab": { + "__id__": 81 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 76 + }, + "_enabled": true, + "__prefab": { + "__id__": 78 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 150, + "height": 40 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "5fboR6YyBN54l5x0btJQyW" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 76 + }, + "_enabled": true, + "__prefab": { + "__id__": 80 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_string": "重置服务器帧", + "_horizontalAlign": 1, + "_verticalAlign": 1, + "_actualFontSize": 20, + "_fontSize": 20, + "_fontFamily": "Arial", + "_lineHeight": 40, + "_overflow": 1, + "_enableWrapText": false, + "_font": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_isItalic": false, + "_isBold": false, + "_isUnderline": false, + "_underlineHeight": 2, + "_cacheMode": 0, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "a6QibMTH5G+7LMHG0qhbVT" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "da36iiJxtJPZLjwyxqfLYI", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 75 + }, + "_enabled": true, + "__prefab": { + "__id__": 83 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 150, + "height": 40 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "11gVfKX15J75lmC5wMXNoV" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 75 + }, + "_enabled": true, + "__prefab": { + "__id__": 85 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 1, + "_fillType": 0, + "_sizeMode": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_useGrayscale": false, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "6bzNThqslF4rtzhtv4z/wB" + }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 75 + }, + "_enabled": true, + "__prefab": { + "__id__": 87 + }, + "clickEvents": [ + { + "__id__": 88 + } + ], + "_interactable": true, + "_transition": 2, + "_normalColor": { + "__type__": "cc.Color", + "r": 214, + "g": 214, + "b": 214, + "a": 255 + }, + "_hoverColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_pressedColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_normalSprite": { + "__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_hoverSprite": { + "__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_pressedSprite": { + "__uuid__": "544e49d6-3f05-4fa8-9a9e-091f98fc2ce8@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_disabledSprite": { + "__uuid__": "951249e0-9f16-456d-8b85-a6ca954da16b@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_duration": 0.1, + "_zoomScale": 1.2, + "_target": { + "__id__": 75 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "33456IPOpL9oM7x0gq/Oo4" + }, + { + "__type__": "cc.ClickEvent", + "target": { + "__id__": 1 + }, + "component": "", + "_componentId": "15051raQgZN6J5ICgY2OfSS", + "handler": "onClickResetServer", + "customEventData": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "17rzI8RjNOmqCFQhUeM594", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, { "__type__": "cc.UITransform", "_name": "", @@ -1787,7 +2153,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 76 + "__id__": 91 }, "_contentSize": { "__type__": "cc.Size", @@ -1815,7 +2181,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 78 + "__id__": 93 }, "_alignFlags": 45, "_target": null, @@ -1851,7 +2217,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 80 + "__id__": 95 }, "frameText": { "__id__": 11 diff --git a/JisolGameCocos/assets/script/App.ts b/JisolGameCocos/assets/script/App.ts index b3943123..562fb857 100644 --- a/JisolGameCocos/assets/script/App.ts +++ b/JisolGameCocos/assets/script/App.ts @@ -25,7 +25,7 @@ import { TableGRoleAttackEffect } from "../resources/config/ts/TableGRoleAttackE import { TableGRoleSkill } from "../resources/config/ts/TableGRoleSkill"; import { TableGRoleSkillEffect } from "../resources/config/ts/TableGRoleSkillEffect"; -let IP = "192.168.1.23"; +let IP = "localhost"; //重写UI class JNGLayer extends JNLayer{ diff --git a/JisolGameCocos/assets/script/WorldCanvas.ts b/JisolGameCocos/assets/script/WorldCanvas.ts index 34201903..18a20d57 100644 --- a/JisolGameCocos/assets/script/WorldCanvas.ts +++ b/JisolGameCocos/assets/script/WorldCanvas.ts @@ -41,6 +41,9 @@ export class WorldCanvas extends Component { //创建世界 create(){ this.root.addChild(instantiate(this.prefab)) + this.scheduleOnce(() => { + app.sync.onStart(); + }); } update(deltaTime: number) { diff --git a/JisolGameCocos/assets/script/battle/base/attack/GAttackParabolicBangRemote.ts b/JisolGameCocos/assets/script/battle/base/attack/GAttackParabolicBangRemote.ts index 2bb7d9f7..72a1660f 100644 --- a/JisolGameCocos/assets/script/battle/base/attack/GAttackParabolicBangRemote.ts +++ b/JisolGameCocos/assets/script/battle/base/attack/GAttackParabolicBangRemote.ts @@ -8,16 +8,14 @@ import { v3 } from "cc"; import { bezier } from "cc"; import { v2 } from "cc"; import { Vec2 } from "cc"; -import { sp } from "cc"; import GEffectUtil from "../../effect/GEffectUtil"; import { TableGRoleAttackEffect } from "../../../../resources/config/ts/TableGRoleAttackEffect"; import GDetection from "../common/GDetection"; import { rect } from "cc"; -import { UITransform } from "cc"; -import { BoxCollider2D } from "cc"; + /** * 抛物线 爆炸普攻 - * 攻击子弹,爆炸特效,龙骨-初始位置,子弹大小 + * 攻击子弹,爆炸特效,龙骨-初始位置,子弹大小,爆炸宽度,爆炸高度 */ export default class GAttackParabolicRemote implements GAttackBase{ @@ -26,7 +24,6 @@ export default class GAttackParabolicRemote implements GAttackBase{ let enemy = role.fsm.enemy; if(!enemy) return; - //[子弹图片] let image:SpriteFrame = app.role.bullets[info.attackArgs[0]]; let bang = { ske: app.role.effects[info.attackArgs[1]], diff --git a/JisolGameCocos/assets/script/battle/base/fsm/base/GFSMBattle/GFSMBattle.ts b/JisolGameCocos/assets/script/battle/base/fsm/base/GFSMBattle/GFSMBattle.ts index ca8bdefb..a6e62242 100644 --- a/JisolGameCocos/assets/script/battle/base/fsm/base/GFSMBattle/GFSMBattle.ts +++ b/JisolGameCocos/assets/script/battle/base/fsm/base/GFSMBattle/GFSMBattle.ts @@ -149,14 +149,17 @@ export default abstract class GFSMBattle extends GFSMBase{ this.player.fsmAnim.isAttack = true; //如果有敌人则攻击 没有 则 重置 if(this.enemy){ - // if(){ - // //如果可以释放大招 - // }else{ - // //不可以则普攻 //朝向敌人 this.player.onTowardsTarget(this.enemy); - return GFSMProcessEnum.Wait; - // } + + //是否可释放技能 + if(this.player.isReleaseSkill()){ + //则释放技能 + return ProcessEnum.ReleaseSkills; + }else{ + return GFSMProcessEnum.Wait; + } + }else{ return ProcessEnum.SeekEnemy; } @@ -165,6 +168,21 @@ export default abstract class GFSMBattle extends GFSMBase{ //释放技能 onReleaseSkillsProcess(){ + //如果正在释放则等待 + if(this.player.isReleasingSkill()){ + return GFSMProcessEnum.Wait; + } + + //释放技能 + if(this.player.isReleaseSkill()){ + //如果可以释放技能则释放 + this.player.onReleaseSkill(); + return GFSMProcessEnum.Wait; + }else{ + //不可以则回到攻击 + return ProcessEnum.AttackEnemy; + } + } diff --git a/JisolGameCocos/assets/script/battle/base/fsm/base/GFSMBattle/GFSMBattleAmin.ts b/JisolGameCocos/assets/script/battle/base/fsm/base/GFSMBattle/GFSMBattleAmin.ts index 05d72a12..29832dab 100644 --- a/JisolGameCocos/assets/script/battle/base/fsm/base/GFSMBattle/GFSMBattleAmin.ts +++ b/JisolGameCocos/assets/script/battle/base/fsm/base/GFSMBattle/GFSMBattleAmin.ts @@ -1,5 +1,8 @@ import { sp } from "cc"; import GFSMBase, { GFSMProcessEnum, GFSMProcessInfo, GFSMProcessMode } from "../../GFSMBase"; +import GRoleBase from "../../../role/GRoleBase"; +import GRolePVPEntity from "../../../role/PVP/GRolePVPEntity"; +import GObject from "../../../GObject"; //角色动画名称枚举 export enum GFSMBattleAminEnum { @@ -63,7 +66,8 @@ export class GFSMBattleAmin extends GFSMBase{ this.trackIndex = trackIndex || 0; //设置监听 this.spine.setEventListener(this.onEventListener.bind(this)); - this.spine.setStartListener(this.onStartListener.bind(this)); + //因为SpineBUG所以不使用Spine监听 采用自己调用 + // this.spine.setStartListener(this.onStartListener.bind(this)); } //添加事件监听 @@ -176,8 +180,9 @@ export class GFSMBattleAmin extends GFSMBase{ //播放动画 if(!info.track){ - console.log("播放动画",info); + console.log(`播放动画-${this.spine.getComponent(GObject).nId}-`,info); info.track = this.spine.setAnimation(this.trackIndex,info.animName,info.isLoop); + this.onStartListener(info.track); } return to; diff --git a/JisolGameCocos/assets/script/battle/base/role/GRoleBase.ts b/JisolGameCocos/assets/script/battle/base/role/GRoleBase.ts index 6ec50658..84548c43 100644 --- a/JisolGameCocos/assets/script/battle/base/role/GRoleBase.ts +++ b/JisolGameCocos/assets/script/battle/base/role/GRoleBase.ts @@ -13,7 +13,7 @@ import { TableGRoleAttack } from "../../../../resources/config/ts/TableGRoleAtta import { GAttack, GAttackBase } from "../attack/GAttack"; import { TableGRole } from "../../../../resources/config/ts/TableGRole"; import { TableGRoleSkill } from "../../../../resources/config/ts/TableGRoleSkill"; -import { GSkill, GSkillBase } from "../../skill/GSkill"; +import { GSkill, GSkillBase, GSkillState } from "../../skill/GSkill"; import JNSkeleton from "../../../../../extensions/ngame/assets/ngame/sync/frame/game/spine/JNFrameSkeleton"; const { ccclass, property } = _decorator; @@ -131,9 +131,8 @@ export default abstract class GRoleBase extends GObject{ this.fsm && this.fsm.onUpdate(dt / 1000); this.fsmAnim && this.fsmAnim.onUpdate(dt / 1000); - if(frame.index == 100){ - this.skills[0] && this.skills[0].release(); - } + //更新技能 + this.skills.forEach(skill => skill.onUpdate(dt)); } @@ -227,12 +226,13 @@ export default abstract class GRoleBase extends GObject{ //击飞 onFly(){ - console.log("onFly"); + if(this.nId == 1) + console.log("onFly"); let vWorld = this.node.worldPosition; let vEndWorld = this.getWorldBackLen(v2(1000,500)); this.JTween(vWorld) .to({x:vEndWorld.x},800) - .onUpdate(pos => this.node.worldPosition = vWorld) + .onUpdate(pos => this.node.worldPosition = pos) .start(); this.JTween(vWorld) .to({y:vEndWorld.y},800) @@ -252,6 +252,37 @@ export default abstract class GRoleBase extends GObject{ return roles.filter(role => role.type != this.type); } + //判断是否可以释放技能 + isReleaseSkill():boolean{ + for (const skill of this.skills) { + if(skill.isRelease()){ + return true; + } + } + return false; + } + + //释放技能 + onReleaseSkill():boolean{ + for (const skill of this.skills) { + if(skill.isRelease()){ + skill.release(); + return true; + } + } + return false; + } + + //是否正在释放技能 + isReleasingSkill():boolean { + for (const skill of this.skills) { + if(skill.state() == GSkillState.Releasing){ + return true; + } + } + return false; + } + } diff --git a/JisolGameCocos/assets/script/battle/base/role/PVP/GRolePVPEntity.ts b/JisolGameCocos/assets/script/battle/base/role/PVP/GRolePVPEntity.ts index 27e778ab..2238c743 100644 --- a/JisolGameCocos/assets/script/battle/base/role/PVP/GRolePVPEntity.ts +++ b/JisolGameCocos/assets/script/battle/base/role/PVP/GRolePVPEntity.ts @@ -51,6 +51,10 @@ export default class GRolePVPEntity extends GRoleBase{ //更新显示 this.bloodVolume.progress = this.blood / this.fullBlood; + //显示第一个技能进度条 + if(this.skills[0]){ + this.energyVolume.progress = this.skills[0].getProgress(); + } } diff --git a/JisolGameCocos/assets/script/battle/skill/GSkill.ts b/JisolGameCocos/assets/script/battle/skill/GSkill.ts index 2f39bdc8..83a45393 100644 --- a/JisolGameCocos/assets/script/battle/skill/GSkill.ts +++ b/JisolGameCocos/assets/script/battle/skill/GSkill.ts @@ -24,6 +24,12 @@ export interface GSkillBase { //技能状态 state():GSkillState; + //技能更新 + onUpdate(dt:number); + + //返回进度条 + getProgress():number; + } diff --git a/JisolGameCocos/assets/script/battle/skill/GSkillAngerBase.ts b/JisolGameCocos/assets/script/battle/skill/GSkillAngerBase.ts new file mode 100644 index 00000000..025d1f96 --- /dev/null +++ b/JisolGameCocos/assets/script/battle/skill/GSkillAngerBase.ts @@ -0,0 +1,29 @@ +import { TableGRoleSkill } from "../../../resources/config/ts/TableGRoleSkill"; +import GRoleBase from "../base/role/GRoleBase"; +import { GSkillBase, GSkillState } from "./GSkill"; + + +//怒气冷却 +export default abstract class GSkillAngerBase implements GSkillBase { + + bind(role: GRoleBase<{}>, info: TableGRoleSkill): GSkillBase { + throw new Error("Method not implemented."); + } + isRelease(): boolean { + throw new Error("Method not implemented."); + } + release(): boolean { + throw new Error("Method not implemented."); + } + state(): GSkillState { + throw new Error("Method not implemented."); + } + onUpdate(dt: number) { + throw new Error("Method not implemented."); + } + getProgress(): number { + throw new Error("Method not implemented."); + } + +} + diff --git a/JisolGameCocos/assets/script/battle/skill/GSkillAngerBase.ts.meta b/JisolGameCocos/assets/script/battle/skill/GSkillAngerBase.ts.meta new file mode 100644 index 00000000..f507cad4 --- /dev/null +++ b/JisolGameCocos/assets/script/battle/skill/GSkillAngerBase.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "e648aeed-c49c-4f10-b24f-6aef45fc14f5", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/JisolGameCocos/assets/script/battle/skill/GSkillCDBase.ts b/JisolGameCocos/assets/script/battle/skill/GSkillCDBase.ts index 1b465220..fb43eb36 100644 --- a/JisolGameCocos/assets/script/battle/skill/GSkillCDBase.ts +++ b/JisolGameCocos/assets/script/battle/skill/GSkillCDBase.ts @@ -7,33 +7,61 @@ import { GSkillBase, GSkillState } from "./GSkill"; export default abstract class GSkillCDBase implements GSkillBase { //冷却总时间 - cdTatal:number; + cdTatal:number = 0; //冷却时间 - cdTime:number; + cdTime:number = 0; bind(role:GRoleBase<{}>,info: TableGRoleSkill):GSkillCDBase { return this; } + //是否可以释放技能 isRelease(): boolean { - //冷却时间小于等于0可释放 - return this.cdTime <= 0; + return this.cdTime >= this.cdTatal; } //释放技能 release():boolean { - // //是否可以释放技能 - // if(!this.isRelease()) return false; + //是否可以释放技能 + if(!this.isRelease()) return false; + this.cdTime = 0; return this.onRelease(); } //子类实现释放 abstract onRelease():boolean; + //查询状态 state(): GSkillState { - if(this.isRelease()) + + if(this.isReleasing()){ return GSkillState.Releasing + } + + if(this.isRelease()) + return GSkillState.Releasable else return GSkillState.NoRelease + } + + //是否正在释放技能 + isReleasing(): boolean{ + return false; + } + + //更新 + onUpdate(dt:number){ + + if(this.state() == GSkillState.NoRelease){ + this.cdTime += (dt / 1000); + } + + } + + //返回进度 + getProgress():number{ + return this.cdTime / this.cdTatal; + } + } diff --git a/JisolGameCocos/assets/script/battle/skill/RoleSkill/GSkillCrazySquirrel.ts b/JisolGameCocos/assets/script/battle/skill/RoleSkill/GSkillCrazySquirrel.ts index 8e354544..faaf896e 100644 --- a/JisolGameCocos/assets/script/battle/skill/RoleSkill/GSkillCrazySquirrel.ts +++ b/JisolGameCocos/assets/script/battle/skill/RoleSkill/GSkillCrazySquirrel.ts @@ -20,7 +20,6 @@ export default class GSkillCrazySquirrel extends GSkillCDBase{ info: TableGRoleSkill; bind(role:GRoleBase<{}>,info: TableGRoleSkill):GSkillCrazySquirrel { - //技能冷却 this.cdTatal = parseInt(info.skillArgs[0]); this.role = role; diff --git a/JisolGameCocos/assets/script/ui/Home/HomeView.ts b/JisolGameCocos/assets/script/ui/Home/HomeView.ts index b859ff3f..5e042da1 100644 --- a/JisolGameCocos/assets/script/ui/Home/HomeView.ts +++ b/JisolGameCocos/assets/script/ui/Home/HomeView.ts @@ -3,6 +3,7 @@ import { app, JNGLayerBase } from '../../App'; import { director } from 'cc'; import GRolePVPEntity from '../../battle/base/role/PVP/GRolePVPEntity'; import { Toggle } from 'cc'; +import { JNSyncAction } from '../../../../extensions/ngame/assets/ngame/sync/JNSyncAction'; const { ccclass, property } = _decorator; @ccclass('HomeView') @@ -34,9 +35,11 @@ export class HomeView extends JNGLayerBase { //重置 onClickReset(){ app.sync.onReset(); - this.scheduleOnce(() => { - app.sync.onStart(); - }); + } + + //重置服务器帧 + onClickResetServer(){ + app.socket.Send(JNSyncAction.NSyncFrameReset); } } diff --git a/JisolGameCocos/config/GRoleSkill.xlsx b/JisolGameCocos/config/GRoleSkill.xlsx index b94c709d..82266c37 100644 Binary files a/JisolGameCocos/config/GRoleSkill.xlsx and b/JisolGameCocos/config/GRoleSkill.xlsx differ diff --git a/JisolGameCocos/extensions/ngame b/JisolGameCocos/extensions/ngame index 4180e907..eee2a612 160000 --- a/JisolGameCocos/extensions/ngame +++ b/JisolGameCocos/extensions/ngame @@ -1 +1 @@ -Subproject commit 4180e907fcd63bbc8769dac502923d0f314dbd76 +Subproject commit eee2a6129cee115fa9f03d0f0a98a12da1e63741 diff --git a/JisolGameServer/pom.xml b/JisolGameServer/pom.xml index e2998623..3b73f5c1 100644 --- a/JisolGameServer/pom.xml +++ b/JisolGameServer/pom.xml @@ -7,12 +7,7 @@ org.example JisolGameServer 1.0-SNAPSHOT - - - cn.jisol - JNGame - 1.0-SNAPSHOT - + jar 8 @@ -24,7 +19,7 @@ cn.jisol JNGame - 1.0-SNAPSHOT + 2.0-SNAPSHOT diff --git a/JisolGameServer/src/main/resources/META-INF/MANIFEST.MF b/JisolGameServer/src/main/resources/META-INF/MANIFEST.MF new file mode 100644 index 00000000..30abd302 --- /dev/null +++ b/JisolGameServer/src/main/resources/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Main-Class: cn.jisol.game.JGameApplication +