mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-06-26 03:14:47 +00:00
提交
This commit is contained in:
parent
c6710e7dfa
commit
97ae04563c
Binary file not shown.
BIN
DataTables/Datas/活动/竞技场/竞技场配置.xlsx
Normal file
BIN
DataTables/Datas/活动/竞技场/竞技场配置.xlsx
Normal file
Binary file not shown.
BIN
DataTables/Datas/系统福利/每天挂机福利.xlsx
Normal file
BIN
DataTables/Datas/系统福利/每天挂机福利.xlsx
Normal file
Binary file not shown.
BIN
DataTables/Datas/系统福利/每日签到.xlsx
Normal file
BIN
DataTables/Datas/系统福利/每日签到.xlsx
Normal file
Binary file not shown.
@ -28,12 +28,12 @@ import AppAction from "./AppAction";
|
||||
import { Asset } from "cc";
|
||||
import { Component } from "cc";
|
||||
|
||||
// let APIPath = `http://localhost:8080`
|
||||
// let WsPath = `ws://localhost:8080/websocket`
|
||||
let APIPath = `http://localhost:8080`
|
||||
let WsPath = `ws://localhost:8080/websocket`
|
||||
// let APIPath = `http://192.168.1.23:8080`
|
||||
// let WsPath = `ws://192.168.1.23:8080/websocket`
|
||||
let APIPath = `http://192.168.0.118:8080`
|
||||
let WsPath = `ws://192.168.0.118:8080/websocket`
|
||||
// let APIPath = `http://192.168.0.118:8080`
|
||||
// let WsPath = `ws://192.168.0.118:8080/websocket`
|
||||
// let APIPath = `https://api.pet.jisol.cn`
|
||||
// let WsPath = `wss://api.pet.jisol.cn/websocket`
|
||||
|
||||
|
@ -2,6 +2,7 @@ import SystemBase from "../../extensions/ngame/assets/ngame/system/SystemBase";
|
||||
import { app } from "./App";
|
||||
import BaseData from "./data/BaseData";
|
||||
import ChatData from "./data/ChatData";
|
||||
import DungeonData from "./data/DungeonData";
|
||||
import GBattleData from "./data/GBattleData";
|
||||
import GOnHookData from "./data/GOnHookData";
|
||||
import GiftData from "./data/GiftData";
|
||||
@ -25,6 +26,7 @@ export class AppData extends SystemBase{
|
||||
PlayerTacticalData.getIns(), //阵法
|
||||
ResourceData.getIns(), //玩家资源
|
||||
GOnHookData.getIns(), //无限模式信息类 (无限模式是游戏基础模式玩法 需要默认信息)
|
||||
DungeonData.getIns(), //副本数据类
|
||||
GBattleData.getIns(), //战斗数据(永远最后)
|
||||
];
|
||||
|
||||
|
@ -11,6 +11,7 @@ import GAttributeData from "../base/values/GAttributeData";
|
||||
import JNFrameTime from "../../../../extensions/ngame/assets/ngame/sync/frame/game/time/JNFrameTime";
|
||||
import { GAPI } from "../../consts/GAPI";
|
||||
import { Node } from "cc";
|
||||
import DungeonData from "../../data/DungeonData";
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
export interface GDungeonModeData{
|
||||
@ -75,7 +76,7 @@ export default class GDungeonMode extends GNormalModeBase<{},GDungeonModeData>{
|
||||
onBattleEnd(win:GNormalModePlayerEnum){
|
||||
//结束游戏
|
||||
JNFrameTime.getInstance().setTimeout(async () => {
|
||||
await GAPI.GDungeonChallenge(this.data.dungeonId,this.data.dungeonItemId);
|
||||
await DungeonData.getIns().challenge(this.data.dungeonId,this.data.dungeonItemId);
|
||||
this.Close();
|
||||
},3000)
|
||||
}
|
||||
|
@ -16,6 +16,14 @@ export interface ModeOnHookOV{
|
||||
|
||||
}
|
||||
|
||||
export interface Dungeon{
|
||||
dungeonId:number; //副本唯一Id
|
||||
playerId:number; //副本玩家Id
|
||||
dungeonCfgId:number; //副本配置表Id
|
||||
dungeonCfgItemId:number; //副本进度表Id
|
||||
}
|
||||
|
||||
|
||||
export const GAPI = {
|
||||
|
||||
/************** 无限模式接口 ********************/
|
||||
@ -35,7 +43,9 @@ export const GAPI = {
|
||||
GOnHookWinLevel : async () => RData(await app.api.post(`/game/mode/onHook/winLevel`),false) as ModeOnHookOV,
|
||||
|
||||
/*************** 副本接口 ***********************/
|
||||
//获取副本信息
|
||||
GDungeonGetInfo : async () => RData(await app.api.get(`/game/mode/dungeon/info`)) as {[key:string]:Dungeon},
|
||||
//消耗钥匙挑战副本
|
||||
GDungeonChallenge : async (dungeonId,dungeonItemId) => RData(await app.api.post(`/game/mode/dungeon/challenge/dungeon/${dungeonId}/${dungeonItemId}`),false) as void,
|
||||
GDungeonChallenge : async (dungeonId,dungeonItemId) => RData(await app.api.post(`/game/mode/dungeon/challenge/dungeon/${dungeonId}/${dungeonItemId}`),false) as {[key:string]:Dungeon},
|
||||
|
||||
}
|
43
JisolGameCocos/assets/script/data/DungeonData.ts
Normal file
43
JisolGameCocos/assets/script/data/DungeonData.ts
Normal file
@ -0,0 +1,43 @@
|
||||
import { TD } from "../App";
|
||||
import { Dungeon, GAPI } from "../consts/GAPI";
|
||||
import BaseData from "./BaseData";
|
||||
|
||||
export default class DungeonData extends BaseData{
|
||||
|
||||
info:{[key:string]:Dungeon};
|
||||
|
||||
async onInit() {
|
||||
await this.UpdateInfo();
|
||||
}
|
||||
|
||||
//获取信息
|
||||
async getInfo(){
|
||||
if(this.info){
|
||||
return this.info;
|
||||
}else{
|
||||
return await this.UpdateInfo();
|
||||
}
|
||||
}
|
||||
|
||||
//更新信息
|
||||
async UpdateInfo(){
|
||||
return this.info = await GAPI.GDungeonGetInfo();
|
||||
}
|
||||
|
||||
//获取指定Id的进度
|
||||
async getInfoProcess(id:number){
|
||||
return ((await this.getInfo())[`${id}`] as Dungeon).dungeonCfgItemId;
|
||||
}
|
||||
|
||||
//获取指定副本的最大关卡
|
||||
getMaxProcess(id:number){
|
||||
let datas = TD[`TbGSysDungeon${160001}`].getDataList();
|
||||
return datas[datas.length - 1].id;
|
||||
}
|
||||
|
||||
//挑战
|
||||
async challenge(dungeonId:number,dungeonItemId:number){
|
||||
this.info = await GAPI.GDungeonChallenge(dungeonId,dungeonItemId)
|
||||
}
|
||||
|
||||
}
|
9
JisolGameCocos/assets/script/data/DungeonData.ts.meta
Normal file
9
JisolGameCocos/assets/script/data/DungeonData.ts.meta
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "cae80288-0426-4c67-a214-3f3191e51411",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
@ -7,6 +7,7 @@ import { app, TD } from '../../App';
|
||||
import { GUI } from '../UIConfig';
|
||||
import { PlayerResourceShow } from '../Consts/Resource/PlayerResourceShow';
|
||||
import ResourceData from '../../data/ResourceData';
|
||||
import DungeonData from '../../data/DungeonData';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('DungeonShowItem')
|
||||
@ -20,28 +21,28 @@ export class DungeonShowItem extends JNScrollViewItem<TB.TbGSysDungeon> {
|
||||
@property(PlayerResourceShow)
|
||||
resource:PlayerResourceShow;
|
||||
|
||||
onInit(){
|
||||
async onInit(){
|
||||
|
||||
this.resource.type = this.data.consume.id;
|
||||
this.resource.onUpdateView();
|
||||
this.onUpdateView();
|
||||
await this.onUpdateView();
|
||||
|
||||
}
|
||||
|
||||
onUpdateView(){
|
||||
async onUpdateView(){
|
||||
|
||||
this.title.string = this.data.name;
|
||||
this.title.string = `${this.data.name} (${await DungeonData.getIns().getInfoProcess(this.data.id)} / ${DungeonData.getIns().getMaxProcess(this.data.id)})`;
|
||||
|
||||
}
|
||||
|
||||
//点击副本
|
||||
onClickDungeon(){
|
||||
async onClickDungeon(){
|
||||
|
||||
if(ResourceData.getIns().getValue(this.data.consume.id) >= this.data.consume.value){
|
||||
//打开副本
|
||||
GBattleModeManager.getIns().Open(BattleMode[`${this.data.type}`],true,{
|
||||
dungeonId:this.data.id,
|
||||
dungeonItemId:TD[`${this.data.tigs}`].getDataList()[0].id,
|
||||
dungeonItemId:await DungeonData.getIns().getInfoProcess(this.data.id),
|
||||
data:TD[`${this.data.tigs}`].getDataList()[0].data
|
||||
});
|
||||
app.layer.Close(GUI.DungeonView);
|
||||
|
@ -41,7 +41,7 @@ public class GDungeonController {
|
||||
//获取副本信息
|
||||
@ApiImplicitParams({})
|
||||
@ApiOperation(value = "获取副本信息")
|
||||
@PostMapping("/info")
|
||||
@GetMapping("/info")
|
||||
public NewsContext<Map<Integer,Dungeon>> getInfos(@CurrentPlayer Player player){
|
||||
|
||||
//获取所有副本信息
|
||||
|
@ -4,8 +4,8 @@ spring:
|
||||
datasource:
|
||||
username: pet_jisol_cn
|
||||
password: sThsBwjfDcaw2wJR
|
||||
# url: jdbc:mysql://kyu.jisol.cn:3306/pet_jisol_cn?useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT%2B8&allowMultiQueries=true
|
||||
url: jdbc:mysql://localhost:3306/pet_jisol_cn?useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT%2B8&allowMultiQueries=true
|
||||
url: jdbc:mysql://kyu.jisol.cn:3306/pet_jisol_cn?useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT%2B8&allowMultiQueries=true
|
||||
# url: jdbc:mysql://localhost:3306/pet_jisol_cn?useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT%2B8&allowMultiQueries=true
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
jackson:
|
||||
serialization:
|
||||
|
Loading…
x
Reference in New Issue
Block a user