This commit is contained in:
parent
31cbb3f511
commit
fa81645638
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
"ver": "1.2.0",
|
||||||
|
"importer": "directory",
|
||||||
|
"imported": true,
|
||||||
|
"uuid": "85ed63ec-135a-40dd-a689-ef3a4c3b08d4",
|
||||||
|
"files": [],
|
||||||
|
"subMetas": {},
|
||||||
|
"userData": {}
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
/************************************************************************************
|
||||||
|
|
||||||
|
* FileName : GameDefine.ts
|
||||||
|
* Description :
|
||||||
|
* Version : v1.0.0
|
||||||
|
* CreateTime : 2025-02-21 09:46:26
|
||||||
|
* Author :
|
||||||
|
* Copyright (c) since 2025
|
||||||
|
* ==============================================================
|
||||||
|
* Method Description:
|
||||||
|
*
|
||||||
|
* ==============================================================
|
||||||
|
************************************************************************************/
|
||||||
|
export enum EGameDefine{
|
||||||
|
/** 匹配花费 */
|
||||||
|
GameMatchCost = 100,
|
||||||
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
"ver": "4.0.24",
|
||||||
|
"importer": "typescript",
|
||||||
|
"imported": true,
|
||||||
|
"uuid": "008bcc9e-5467-443b-bbd1-76c6843796d0",
|
||||||
|
"files": [],
|
||||||
|
"subMetas": {},
|
||||||
|
"userData": {}
|
||||||
|
}
|
|
@ -1,6 +1,14 @@
|
||||||
import {_decorator, Component, director, instantiate, JsonAsset, Label, Node, Prefab, tween, v3, SpriteFrame, Sprite, PageView, Input, EventTouch} from 'cc';
|
import {_decorator, Component, director, instantiate, JsonAsset, Label, Node, Prefab, tween, v3, SpriteFrame, Sprite, PageView, Input, EventTouch} from 'cc';
|
||||||
import {UserMgr} from '../../module_basic/scripts/UserMgr';
|
import {UserMgr} from '../../module_basic/scripts/UserMgr';
|
||||||
import {tgxAudioMgr, tgxModuleContext, tgxSceneUtil, tgxUIAlert, tgxUIMgr, tgxUIWaiting} from '../../core_tgx/tgx';
|
import {
|
||||||
|
tgxAudioMgr,
|
||||||
|
tgxModuleContext,
|
||||||
|
tgxSceneUtil,
|
||||||
|
tgxUIAlert,
|
||||||
|
tgxUIMgr,
|
||||||
|
tgxUITipsBar,
|
||||||
|
tgxUIWaiting
|
||||||
|
} from '../../core_tgx/tgx';
|
||||||
import {SceneDef} from '../../scripts/SceneDef';
|
import {SceneDef} from '../../scripts/SceneDef';
|
||||||
import {SceneUtil} from '../../core_tgx/base/SceneUtils';
|
import {SceneUtil} from '../../core_tgx/base/SceneUtils';
|
||||||
import {UI_SearchingRival} from 'db://assets/module_arean/ui_searching_rival/UI_SearchingRival';
|
import {UI_SearchingRival} from 'db://assets/module_arean/ui_searching_rival/UI_SearchingRival';
|
||||||
|
@ -22,6 +30,7 @@ import {UIMail} from "db://assets/module_arean/ui_mail/UIMail";
|
||||||
import {UIMoreModel} from "db://assets/module_arean/ui_more_model/UIMoreModel";
|
import {UIMoreModel} from "db://assets/module_arean/ui_more_model/UIMoreModel";
|
||||||
import { UIShopScreen } from '../shop/ui_shop/UIShopScreen';
|
import { UIShopScreen } from '../shop/ui_shop/UIShopScreen';
|
||||||
import {UISettings} from "db://assets/module_arean/ui_settings/UISettings";
|
import {UISettings} from "db://assets/module_arean/ui_settings/UISettings";
|
||||||
|
import {EGameDefine} from "db://assets/module_arean/Define/GameDefine";
|
||||||
|
|
||||||
const { ccclass, property } = _decorator;
|
const { ccclass, property } = _decorator;
|
||||||
|
|
||||||
|
@ -182,10 +191,13 @@ export class AreanLobbyScene extends Component {
|
||||||
if(!this._canClick) return;
|
if(!this._canClick) return;
|
||||||
this._canClick = false;
|
this._canClick = false;
|
||||||
tgxAudioMgr.inst.playCommonBtn(EMusicDefine.EFFECT_CLICK);
|
tgxAudioMgr.inst.playCommonBtn(EMusicDefine.EFFECT_CLICK);
|
||||||
|
let curCoin = UserMgr.inst.userInfo.coin;
|
||||||
|
if(curCoin < EGameDefine.GameMatchCost){
|
||||||
|
tgxUITipsBar.show("金币不足,请前往商店购买!");
|
||||||
|
this._canClick = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
this._updateFightModel();
|
this._updateFightModel();
|
||||||
// if(UserLocalCache.inst.fightModel === EFightModel.Match){
|
|
||||||
// tgxUIAlert.show("研发团队加班中,敬请期待!");
|
|
||||||
// }else{
|
|
||||||
tgxUIWaiting.hide();
|
tgxUIWaiting.hide();
|
||||||
tgxUIMgr.inst.showUI(UI_SearchingRival, (ui: UI_SearchingRival) => {
|
tgxUIMgr.inst.showUI(UI_SearchingRival, (ui: UI_SearchingRival) => {
|
||||||
this.scheduleOnce(() => {
|
this.scheduleOnce(() => {
|
||||||
|
@ -193,8 +205,6 @@ export class AreanLobbyScene extends Component {
|
||||||
this.setCanClick(true);
|
this.setCanClick(true);
|
||||||
}, 1.5);
|
}, 1.5);
|
||||||
});
|
});
|
||||||
// }
|
|
||||||
// director.loadScene(SceneDef.Arean.name);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private async loadGame(params?: any) {
|
private async loadGame(params?: any) {
|
||||||
|
|
|
@ -401,8 +401,9 @@ export class UserMgr {
|
||||||
}
|
}
|
||||||
|
|
||||||
async rpc_QuickPlay(type: string, immediate?: boolean) {
|
async rpc_QuickPlay(type: string, immediate?: boolean) {
|
||||||
console.log("rpc_QuickPlay----快速游戏", type, immediate);
|
console.log("rpc_QuickPlay----快速游戏001", type, immediate);
|
||||||
let ret = await NetGameServer.inst.callApi("lobby/StartMatch", { type: type, immediate: immediate,gameModel:UserLocalCache.inst.fightModel });
|
let ret = await NetGameServer.inst.callApi("lobby/StartMatch", { type: type, immediate: immediate,gameModel:UserLocalCache.inst.fightModel });
|
||||||
|
console.log("rpc_QuickPlay----快速游戏002", ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,11 +21,9 @@ import {IPropCfg} from "../../shared/configs/interface/IPropCfg";
|
||||||
|
|
||||||
const schema = new mongoose.Schema<DBHeroInfo>({
|
const schema = new mongoose.Schema<DBHeroInfo>({
|
||||||
heroId : {
|
heroId : {
|
||||||
type : Number,
|
type : Number},
|
||||||
index: { unique: false }},
|
|
||||||
playerId : {
|
playerId : {
|
||||||
type: String,
|
type: String
|
||||||
index: { unique: false } // 不需要唯一索引,因为玩家 ID 可能在玩家表中不是索引
|
|
||||||
},
|
},
|
||||||
level : {type : Number,required: true,default : 0},
|
level : {type : Number,required: true,default : 0},
|
||||||
skinId : {type : Number,required: true,default : 0},
|
skinId : {type : Number,required: true,default : 0},
|
||||||
|
|
Loading…
Reference in New Issue